Restricted upsampling process in matrix-based intra prediction

ABSTRACT

Devices, systems and methods for digital video coding, which includes matrix-based intra prediction methods for video coding, are described. In a representative aspect, a method for video processing includes performing a conversion between a current video block of a video and a bitstream representation of the current video block using a matrix based intra prediction (MIP) mode, where the conversion includes performing the upsampling operation in which the final prediction block is determined by using a reduced prediction block of the current video block and by using reconstructed neighboring samples of the current video block according to a rule, and where the reduced prediction block is obtained by performing the matrix vector multiplication operation on reduced boundary samples of the current video block.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Patent ApplicationNo. PCT/CN2020/092906, filed on May 28, 2020, which claims the priorityto and benefits of International Patent Application No.PCT/CN2019/089590, filed on May 31, 2019. All the aforementioned patentapplications are hereby incorporated by reference in their entireties.

TECHNICAL FIELD

This patent document relates to video coding techniques, devices andsystems.

BACKGROUND

In spite of the advances in video compression, digital video stillaccounts for the largest bandwidth use on the internet and other digitalcommunication networks. As the number of connected user devices capableof receiving and displaying video increases, it is expected that thebandwidth demand for digital video usage will continue to grow.

SUMMARY

Devices, systems and methods related to digital video coding, andspecifically, matrix-based intra prediction methods for video coding aredescribed. The described methods may be applied to both the existingvideo coding standards (e.g., High Efficiency Video Coding (HEVC)) andfuture video coding standards (e.g., Versatile Video Coding (VVC)) orcodecs.

In one representative aspect, the disclosed technology may be used toprovide a method for video processing. This exemplary method includesperforming a conversion between a current video block of a video and abitstream representation of the current video block using a matrix basedintra prediction (MIP) mode in which a prediction block of the currentvideo block is determined by performing, on previously coded samples ofthe video, a boundary downsampling operation, followed by a matrixvector multiplication operation, and selectively followed by anupsampling operation, where the conversion includes performing theboundary downsampling operation in a single stage in which reducedboundary samples of the current video block are generated according to arule based at least on reference boundary samples of the current videoblock, and where the conversion includes performing the matrix vectormultiplication operation using the reduced boundary samples of thecurrent video block.

In another representative aspect, the disclosed technology may be usedto provide a method for video processing. This exemplary method includesperforming a conversion between a current video block of a video and abitstream representation of the current video block using a matrix basedintra prediction (MIP) mode in which a final prediction block of thecurrent video block is determined by performing, on previously codedsamples of the video, a boundary downsampling operation, followed by amatrix vector multiplication operation, and followed by an upsamplingoperation, where the conversion includes performing the upsamplingoperation in which the final prediction block is determined by using areduced prediction block of the current video block and by usingreconstructed neighboring samples of the current video block accordingto a rule, and where the reduced prediction block is obtained byperforming the matrix vector multiplication operation on reducedboundary samples of the current video block.

In another representative aspect, the disclosed technology may be usedto provide a method for video processing. This exemplary method includesdetermining that a current video block is coded using an affine linearweighted intra prediction (ALWIP) mode, constructing, based on thedetermining, at least a portion of a most probable mode (MPM) list forthe ALWIP mode based on an at least a portion of an MPM list for anon-ALWIP intra mode, and performing, based on the MPM list for theALWIP mode, a conversion between the current video block and a bitstreamrepresentation of the current video block.

In another representative aspect, the disclosed technology may be usedto provide a method for video processing. This exemplary method includesdetermining that a luma component of a current video block is codedusing an affine linear weighted intra prediction (ALWIP) mode,inferring, based on the determining, a chroma intra mode, andperforming, based on the chroma intra mode, a conversion between thecurrent video block and a bitstream representation of the current videoblock.

In yet another representative aspect, the disclosed technology may beused to provide a method for video processing. This exemplary methodincludes determining that a current video block is coded using an affinelinear weighted intra prediction (ALWIP) mode, and performing, based onthe determining, a conversion between the current video block and abitstream representation of the current video block.

In yet another representative aspect, the disclosed technology may beused to provide a method for video processing. This exemplary methodincludes determining that a current video block is coded using a codingmode different from an affine linear weighted intra prediction (ALWIP)mode, and performing, based on the determining, a conversion between thecurrent video block and a bitstream representation of the current videoblock.

In yet another representative aspect, the disclosed technology may beused to provide a method for video processing. This exemplary methodincludes generating, for a current video block, a first prediction usingan affine linear weighted intra prediction (ALWIP) mode, generating,based on the first prediction, a second prediction using positiondependent intra prediction combination (PDPC), and performing, based onthe second prediction, a conversion between the current video block anda bitstream representation of the current video block.

In yet another representative aspect, the disclosed technology may beused to provide a method for video processing. This exemplary methodincludes determining that a current video block is coded using an affinelinear weighted intra prediction (ALWIP) mode, predicting, based on theALWIP mode, a plurality of sub-blocks of the current video block, andperforming, based on the predicting, a conversion between the currentvideo block and a bitstream representation of the current video block.

In yet another representative aspect, a method of video processing isdisclosed. The method includes determining, based on a rule for acurrent video block, a context of a flag indicative of use of affinelinear weighted intra prediction (ALWIP) mode during a conversionbetween the current video block and a bitstream representation of thecurrent video block, predicting, based on the ALWIP mode, a plurality ofsub-blocks of the current video block and performing, based on thepredicting, the conversion between the current video block and abitstream representation of the current video block.

In yet another representative aspect, a method of video processing isdisclosed. The method includes determining that a current video block iscoded using an affine linear weighted intra prediction (ALWIP) mode, andperforming, during a conversion between the current video block and abitstream representation of the current video block, at least twofiltering stages on samples of the current video block in an upsamplingprocess associated with the ALWIP mode, wherein a first precision of thesamples in a first filtering stage of the at least two filtering stagesis different from a second precision of the samples in a secondfiltering stage of the at least two filtering stages.

In yet another aspect, a method of video processing is disclosed. Themethod includes determining that a current video block is coded using anaffine linear weighted intra prediction (ALWIP) mode, performing, duringa conversion between the current video block and a bitstreamrepresentation of the current video block, at least two filtering stageson samples of the current video block in an upsampling processassociated with the ALWIP mode, wherein the upsampling process isperformed in a fixed order for a case in which both vertical andhorizontal upsampling is performed.

In yet another aspect, a method of video processing is disclosed. Themethod includes determining that a current video block is coded using anaffine linear weighted intra prediction (ALWIP) mode, performing, duringa conversion between the current video block and a bitstreamrepresentation of the current video block, at least two filtering stageson samples of the current video block in an upsampling processassociated with the ALWIP mode, wherein the conversion includesperforming a transposing operation prior to the upsampling process.

In yet another representative aspect, the above-described method isembodied in the form of processor-executable code and stored in acomputer-readable program medium.

In yet another representative aspect, a device that is configured oroperable to perform the above-described method is disclosed. The devicemay include a processor that is programmed to implement this method.

In yet another representative aspect, a video decoder apparatus mayimplement a method as described herein.

The above and other aspects and features of the disclosed technology aredescribed in greater detail in the drawings, the description and theclaims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows an example of 33 intra prediction directions.

FIG. 2 shows an example of 67 intra prediction modes.

FIG. 3 shows an example of locations of samples used for the derivationof the weights of the linear model.

FIG. 4 shows an example of four reference lines neighboring a predictionblock.

FIG. 5A and FIG. 5B show examples of sub-partitions depending on blocksize.

FIG. 6 shows an example of ALWIP for 4×4 blocks.

FIG. 7 shows an example of ALWIP for 8×8 blocks.

FIG. 8 shows an example of ALWIP for 8×4 blocks.

FIG. 9 shows an example of ALWIP for 16×16 blocks.

FIG. 10 shows an example of neighboring blocks using in MPM listconstruction.

FIG. 11 shows a flowchart of an example method for matrix-based intraprediction, in accordance with the disclosed technology.

FIG. 12 shows a flowchart of another example method for matrix-basedintra prediction, in accordance with the disclosed technology.

FIG. 13 shows a flowchart of yet another example method for matrix-basedintra prediction, in accordance with the disclosed technology.

FIG. 14 shows a flowchart of yet another example method for matrix-basedintra prediction, in accordance with the disclosed technology.

FIG. 15 is a block diagram of an example of a hardware platform forimplementing a visual media decoding or a visual media encodingtechnique described in the present document.

FIG. 16 shows an example of neighboring blocks.

FIG. 17 is an example of the proposed reduced boundary samplesgeneration.

FIG. 18 shows an example of the proposed up-sampling with the originalreconstructed neighbor samples.

FIG. 19 is a block diagram illustrating an example of video decoder.

FIG. 20 is a block diagram showing an example video processing system inwhich various techniques disclosed herein may be implemented.

FIG. 21 is a block diagram that illustrates an example video codingsystem that may utilize the techniques of this disclosure.

FIG. 22 is a block diagram illustrating an example of video encoder.

FIGS. 23-24 show two flowchart of additional example methods formatrix-based intra prediction, in accordance with the disclosedtechnology.

DETAILED DESCRIPTION

Due to the increasing demand of higher resolution video, video codingmethods and techniques are ubiquitous in modern technology. Video codecstypically include an electronic circuit or software that compresses ordecompresses digital video, and are continually being improved toprovide higher coding efficiency. A video codec converts uncompressedvideo to a compressed format or vice versa. There are complexrelationships between the video quality, the amount of data used torepresent the video (determined by the bit rate), the complexity of theencoding and decoding algorithms, sensitivity to data losses and errors,ease of editing, random access, and end-to-end delay (latency). Thecompressed format usually conforms to a standard video compressionspecification, e.g., the High Efficiency Video Coding (HEVC) standard(also known as H.265 or MPEG-H Part 2), the Versatile Video Coding (VVC)standard to be finalized, or other current and/or future video codingstandards.

Embodiments of the disclosed technology may be applied to existing videocoding standards (e.g., HEVC, H.265) and future standards to improveruntime performance. Section headings are used in the present documentto improve readability of the description and do not in any way limitthe discussion or the embodiments (and/or implementations) to therespective sections only.

1 A BRIEF REVIEW ON HEVC 1.1 Intra Prediction in HEVC/H.265

Intra prediction involves producing samples for a given TB (transformblock) using samples previously reconstructed in the considered colorchannel. The intra prediction mode is separately signaled for the lumaand chroma channels, with the chroma channel intra prediction modeoptionally dependent on the luma channel intra prediction mode via the‘DM_CHROMA’ mode. Although the intra prediction mode is signaled at thePB (prediction block) level, the intra prediction process is applied atthe TB level, in accordance with the residual quad-tree hierarchy forthe CU, thereby allowing the coding of one TB to have an effect on thecoding of the next TB within the CU, and therefore reducing the distanceto the samples used as reference values.

HEVC includes 35 intra prediction modes—a DC mode, a planar mode and 33directional, or ‘angular’ intra prediction modes. The 33 angular intraprediction modes are illustrated in FIG. 1.

For PBs associated with chroma color channels, the intra prediction modeis specified as either planar, DC, horizontal, vertical, ‘DM_CHROMA’mode or sometimes diagonal mode ‘34’.

Note for chroma formats 4:2:2 and 4:2:0, the chroma PB may overlap twoor four (respectively) luma PBs; in this case the luma direction forDM_CHROMA is taken from the top left of these luma PBs.

The DM_CHROMA mode indicates that the intra prediction mode of the lumacolor channel PB is applied to the chroma color channel PBs. Since thisis relatively common, the most-probable-mode coding scheme of theintra_chroma_pred_mode is biased in favor of this mode being selected.

2 EXAMPLES OF INTRA PREDICTION IN VVC

2.1 Intra Mode Coding with 67 Intra Prediction Modes

To capture the arbitrary edge directions presented in natural video, thenumber of directional intra modes is extended from 33, as used in HEVC,to 65. The additional directional modes are depicted as red dottedarrows in FIG. 2, and the planar and DC modes remain the same. Thesedenser directional intra prediction modes apply for all block sizes andfor both luma and chroma intra predictions.

2.2 Examples of the Cross-Component Linear Model (CCLM)

In some embodiments, and to reduce the cross-component redundancy, across-component linear model (CCLM) prediction mode (also referred to asLM), is used in the JEM, for which the chroma samples are predictedbased on the reconstructed luma samples of the same CU by using a linearmodel as follows:

pred_(C)(i,j)=α·rec _(L)′(i,j)+β  (1)

Here, pred_(C)(i,j) represents the predicted chroma samples in a CU andrec_(L)′(i,j) represents the downsampled reconstructed luma samples ofthe same CU. Linear model parameter α and β are derived from therelation between luma values and chroma values from two samples, whichare luma sample with minimum sample value and with maximum sample insidethe set of downsampled neighboring luma samples, and their correspondingchroma samples. FIG. 3 shows an example of the location of the left andabove samples and the sample of the current block involved in the CCLMmode.

This parameter computation is performed as part of the decoding process,and is not just as an encoder search operation. As a result, no syntaxis used to convey the α and β values to the decoder.

For chroma intra mode coding, a total of 8 intra modes are allowed forchroma intra mode coding. Those modes include five traditional intramodes and three cross-component linear model modes (CCLM, LM_A, andLM_L). Chroma mode coding directly depends on the intra prediction modeof the corresponding luma block. Since separate block partitioningstructure for luma and chroma components is enabled in I slices, onechroma block may correspond to multiple luma blocks. Therefore, forChroma DM mode, the intra prediction mode of the corresponding lumablock covering the center position of the current chroma block isdirectly inherited.

2.3 Multiple Reference Line (MRL) Intra Prediction

Multiple reference line (MRL) intra prediction uses more reference linesfor intra prediction. In FIG. 4, an example of 4 reference lines isdepicted, where the samples of segments A and F are not fetched fromreconstructed neighboring samples but padded with the closest samplesfrom Segment B and E, respectively. HEVC intra-picture prediction usesthe nearest reference line (i.e., reference line 0). In MRL, 2additional lines (reference line 1 and reference line 3) are used. Theindex of selected reference line (mrl_idx) is signalled and used togenerate intra predictor. For reference line idx, which is greater than0, only include additional reference line modes in MPM list and onlysignal mpm index without remaining mode.

2.4 Intra Sub-Partitions (ISP)

The Intra Sub-Partitions (ISP) tool divides luma intra-predicted blocksvertically or horizontally into 2 or 4 sub-partitions depending on theblock size. For example, minimum block size for ISP is 4×8 (or 8×4). Ifblock size is greater than 4×8 (or 8×4) then the corresponding block isdivided by 4 sub-partitions. FIG. 5 shows examples of the twopossibilities. All sub-partitions fulfill the condition of having atleast 16 samples.

For each sub-partition, reconstructed samples are obtained by adding theresidual signal to the prediction signal. Here, a residual signal isgenerated by the processes such as entropy decoding, inversequantization and inverse transform. Therefore, the reconstructed samplevalues of each sub-partition are available to generate the prediction ofthe next sub-partition, and each sub-partition is processed repeatedly.In addition, the first sub-partition to be processed is the onecontaining the top-left sample of the CU and then continuing downwards(horizontal split) or rightwards (vertical split). As a result,reference samples used to generate the sub-partitions prediction signalsare only located at the left and above sides of the lines. Allsub-partitions share the same intra mode.

2.5 Affine Linear Weighted Intra Prediction (ALWIP or Matrix-Based IntraPrediction)

Affine linear weighted intra prediction (ALWIP, a.k.a. Matrix basedintra prediction (MIP)) is proposed in JVET-N0217.

In JVET-N0217, two tests are conducted. In test 1, ALWIP is designedwith a memory restriction of 8K bytes and at most 4 multiplications persample. Test 2 is similar to test 1, but further simplifies the designin terms of memory requirement and model architecture.

-   -   Single set of matrices and offset vectors for all block shapes.    -   Reduction of number of modes to 19 for all block shapes.    -   Reduction of memory requirement to 576010-bit values, that is        7.20 Kilobyte.    -   Linear interpolation of predicted samples is carried out in a        single step per direction replacing iterative interpolation as        in the first test.

2.5.1 Test 1 of JVET-N0217

For predicting the samples of a rectangular block of width W and heightH, affine linear weighted intra prediction (ALWIP) takes one line of Hreconstructed neighboring boundary samples left of the block and oneline of W reconstructed neighboring boundary samples above the block asinput. If the reconstructed samples are unavailable, they are generatedas it is done in the conventional intra prediction.

The generation of the prediction signal is based on the following threesteps:

Out of the boundary samples, four samples in the case of W=H=4 and eightsamples in all other cases are extracted by averaging.

A matrix vector multiplication, followed by addition of an offset, iscarried out with the averaged samples as an input. The result is areduced prediction signal on a subsampled set of samples in the originalblock.

The prediction signal at the remaining positions is generated from theprediction signal on the subsampled set by linear interpolation which isa single step linear interpolation in each direction.

The matrices and offset vectors needed to generate the prediction signalare taken from three sets S₀, S₁, S₂ of matrices. The set S₀ consists of18 matrices A₀ ^(i), i∈{0, . . . , 17} each of which has 16 rows and 4columns and 18 offset vectors b₀ ^(i), i∈{0, . . . , 17} each of size16. Matrices and offset vectors of that set are used for blocks of size4×4. The set S₁ consists of 10 matrices A₁ ^(i), i∈{0, . . . , 9}, eachof which has 16 rows and 8 columns and 10 offset vectors b₁ ^(i), i∈{0,. . . , 9} each of size 16. Matrices and offset vectors of that set areused for blocks of sizes 4×8, 8×4 and 8×8. Finally, the set S₂ consistsof 6 matrices A₂ ^(i), i∈{0, . . . , 5}, each of which has 64 rows and 8columns and of 6 offset vectors b₂ ^(i), i∈{0, . . . , 5} of size 64.Matrices and offset vectors of that set or parts of these matrices andoffset vectors are used for all other block-shapes.

The total number of multiplications needed in the computation of thematrix vector product is always smaller than or equal to 4×W×H. In otherwords, at most four multiplications per sample are required for theALWIP modes.

2.5.2 Averaging of the Boundary

In a first step, the input boundaries bdry^(top) and bdry^(left) arereduced to smaller boundaries bdry_(red) ^(top) and bdry_(red) ^(left).Here, bdry_(red) ^(top) and bdry_(red) ^(left) both consists of 2samples in the case of a 4×4-block and both consist of 4 samples in allother cases.

In the case of a 4×4-block, for 0≤i<2, one defines

${{bdr}{y_{red}^{top}\lbrack i\rbrack}} = {\left( {\left( {\sum\limits_{j = 0}^{1}{bdr{y^{top}\left\lbrack {{i \cdot 2} + j} \right\rbrack}}} \right) + 1} \right) ⪢ 1}$

and defines bdry_(red) ^(left) analogously.

Otherwise, if the block-width W is given as W=4·2^(k), for 0≤i<4, onedefines

${{bdr}{y_{red}^{top}\lbrack i\rbrack}} = {\left( {\left( {\sum\limits_{j = 0}^{2^{k} - 1}{bdr{y^{top}\left\lbrack {{i \cdot 2^{k}} + j} \right\rbrack}}} \right) + \left( {1 ⪡ \left( {k - 1} \right)} \right)} \right) ⪢ k}$

and defines bdry_(red) ^(left) analogously.

The two reduced boundaries bdry_(red) ^(top) and bdry_(red) ^(left) areconcatenated to a reduced boundary vector bdry_(red) which is thus ofsize four for blocks of shape 4×4 and of size eight for blocks of allother shapes. If mode refers to the ALWIP-mode, this concatenation isdefined as follows:

${bdry_{red}} = \left\{ {\begin{matrix}\left\lbrack {{{bdr}y_{red}^{top}}\ ,\ {{bdr}y_{red}^{left}}} \right\rbrack & {{{for}{\mspace{11mu}\ }W} = {H = {{4\mspace{14mu}{and}\mspace{14mu}{mode}} < 18}}} \\\left\lbrack {{bdry_{red}^{left}},\ {bdry}_{red}^{top}} \right\rbrack & {{{for}\mspace{14mu} W} = {H = {{4\mspace{14mu}{and}\mspace{14mu}{mode}} \geq 18}}} \\\left\lbrack {{{bdr}y_{red}^{top}}\ ,\ {{bdr}y_{red}^{left}}} \right\rbrack & {{{for}\mspace{14mu}{\max\left( {W,H} \right)}} = {{8\mspace{14mu}{and}\mspace{14mu}{mode}} < 10}} \\\left\lbrack {{bdry_{red}^{left}},\ {bdry}_{red}^{top}} \right\rbrack & {{{for}\mspace{14mu}{\max\left( {W,H} \right)}} = {{8\mspace{14mu}{and}\mspace{14mu}{mode}} \geq 10}} \\\left\lbrack {{{bdr}y_{red}^{top}}\ ,\ {{bdr}y_{red}^{left}}} \right\rbrack & {{{for}\mspace{14mu}{\max\left( {W,H} \right)}} > {8\mspace{14mu}{and}\mspace{14mu}{mode}} < 6} \\\left\lbrack {{bdry_{red}^{left}},\ {bdry}_{red}^{top}} \right\rbrack & {{{for}\mspace{14mu}{\max\left( {W,H} \right)}} > {8\mspace{14mu}{and}\mspace{14mu}{mode}} \geq 6}\end{matrix}.} \right.$

Finally, for the interpolation of the subsampled prediction signal, onlarge blocks a second version of the averaged boundary is needed.Namely, if min(W, H)>8 and W≥H, one writes W=8*2^(l), and, for 0≤i<8,defines

${{bdr}{y_{redII}^{top}\lbrack i\rbrack}} = {\left( {\left( {\sum\limits_{j = 0}^{2^{l} - 1}{bdr{y^{top}\left\lbrack {{i \cdot 2^{l}} + j} \right\rbrack}}} \right) + \left( {1 ⪡ \left( {l - 1} \right)} \right)} \right) ⪢ {l.}}$

If min(W, H)>8 and H>W, one defines bdry_(redII) ^(left) analogously.

2.5.3 Generation of the Reduced Prediction Signal by Matrix VectorMultiplication

Out of the reduced input vector bdry_(red) one generates a reducedprediction signal pred_(red). The latter signal is a signal on thedownsampled block of width W_(red) and height H_(red). Here, W_(red) andH_(red) are defined as:

$W_{red} = \left\{ {{\begin{matrix}4 & {{{for}\mspace{14mu}\max\left( {W,H} \right)} \leq 8} \\{\min\left( {W,8} \right)} & {{{for}\mspace{14mu}\max\left( {W,H} \right)} > 8}\end{matrix}H_{red}} = \left\{ \begin{matrix}4 & {{{for}\mspace{14mu}{\max\left( {W,H} \right)}} \leq 8} \\{\min\left( {H,8} \right)} & {{{for}\mspace{14mu}\max\left( {W,H} \right)} > 8}\end{matrix} \right.} \right.$

The reduced prediction signal pred_(red) is computed by calculating amatrix vector product and adding an offset:

pred_(red) =A·bdry_(red) +b

Here, A is a matrix that has W_(red)·H_(red) rows and 4 columns if W=H=4and 8 columns in all other cases. b is a vector of size W_(red)·H_(red).

The matrix A and the vector b are taken from one of the sets S₀, S₁, S₂as follows. One defines an index idx=idx(W, H) as follows:

${id{x\left( {W,H} \right)}} = \left\{ {\begin{matrix}0 & {\ {{{for}\mspace{14mu} W} = {H = 4}}} \\1 & {\ {{{for}\mspace{14mu}{\max\left( {W,H} \right)}} = 8}} \\2 & {\ {{{for}\mspace{14mu}{\max\left( {W,H} \right)}} > 8}}\end{matrix}.} \right.$

Moreover, one puts m as follows:

$m = \left\{ {\begin{matrix}{mode} & {{{for}\mspace{14mu} W} = {H = {{4\mspace{14mu}{and}{\ \mspace{11mu}}{mode}} < 18}}} \\{{mode} - 17} & {{{for}\mspace{14mu} W} = {H = {{4\mspace{14mu}{and}\mspace{14mu}{mode}} \geq 18}}} \\{mode} & {{{for}\mspace{14mu}{\max\left( {W,H} \right)}} = {{8\mspace{14mu}{and}\mspace{14mu}{mode}} < 10}} \\{{mode} - 9} & {{{for}\mspace{14mu}{\max\left( {W,H} \right)}} = {{8\mspace{14mu}{and}\mspace{14mu}{mode}} \geq 10}} \\{mode} & {{{for}\mspace{14mu}{\max\left( {W,H} \right)}} > {8\mspace{14mu}{and}\mspace{14mu}{mode}} < 6} \\{{mode} - 5} & {{{for}\mspace{9mu}{\max\left( {W,H} \right)}} > {8\mspace{14mu}{and}\mspace{14mu}{mode}} \geq 6}\end{matrix}.} \right.$

Then, if idx≤1 or idx=2 and min(W, H)>4, one puts A=A_(idx) ^(m) andb=b_(idx) ^(m). In the case that idx=2 and min(W, H)=4, one lets A bethe matrix that arises by leaving out every row of A_(idx) ^(m) that, inthe case W=4, corresponds to an odd x-coordinate in the downsampledblock, or, in the case H=4, corresponds to an odd y-coordinate in thedownsampled block.

Finally, the reduced prediction signal is replaced by its transpose inthe following cases:

-   -   W=H=4 and mode≥18    -   max(W, H)=8 and mode≥10    -   max(W, H)>8 and mode≥6

The number of multiplications required for calculation of pred_(red) is4 in the case of W=H=4 since in this case A has 4 columns and 16 rows.In all other cases, A has 8 columns and W_(red)·H_(red) rows and oneimmediately verifies that in these cases 8·W_(red)·H_(red)≤4·W·Hmultiplications are required, i.e. also in these cases, at most 4multiplications per sample are needed to compute pred_(red).

2.5.4 Illustration of the Entire ALWIP Process

The entire process of averaging, matrix vector multiplication and linearinterpolation is illustrated for different shapes in FIGS. 6-9. Note,that the remaining shapes are treated as in one of the depicted cases.

1. Given a 4×4 block, ALWIP takes two averages along each axis of theboundary. The resulting four input samples enter the matrix vectormultiplication. The matrices are taken from the set S₀. After adding anoffset, this yields the 16 final prediction samples. Linearinterpolation is not necessary for generating the prediction signal.Thus, a total of (4·16)/(4·4)=4 multiplications per sample areperformed.

2. Given an 8×8 block, ALWIP takes four averages along each axis of theboundary. The resulting eight input samples enter the matrix vectormultiplication. The matrices are taken from the set S₁. This yields 16samples on the odd positions of the prediction block. Thus, a total of(8·16)/(8·8)=2 multiplications per sample are performed. After adding anoffset, these samples are interpolated vertically by using the reducedtop boundary. Horizontal interpolation follows by using the originalleft boundary.

3. Given an 8×4 block, ALWIP takes four averages along the horizontalaxis of the boundary and the four original boundary values on the leftboundary. The resulting eight input samples enter the matrix vectormultiplication. The matrices are taken from the set S₁. This yields 16samples on the odd horizontal and each vertical positions of theprediction block. Thus, a total of (8·16)/(8·4)=4 multiplications persample are performed. After adding an offset, these samples areinterpolated horizontally by using the original left boundary.

4. Given a 16×16 block, ALWIP takes four averages along each axis of theboundary. The resulting eight input samples enter the matrix vectormultiplication. Two-stage of downsampling operations are utilized togenerate the four averages. Firstly, each consecutive two samples areused to derive one downsampled value, therefore, 8 averages of top/leftneighbors may be obtained. Secondly, the 8 averages per side may befurther downsampled to generate 4 averages per side. The 4 averages areused to derive the reduced prediction signal. In addition, the 8 averageper side are further utilized for the generation of final predictionblock via sub-sampling of the reduced prediction signal. The matricesare taken from the set S₂. This yields 64 samples on the odd positionsof the prediction block. Thus, a total of (8·64)/(16·16)=2multiplications per sample are performed. After adding an offset, thesesamples are interpolated vertically by using eight averages of the topboundary. Horizontal interpolation follows by using the original leftboundary. The interpolation process, in this case, does not add anymultiplications. Therefore, totally, two multiplications per sample arerequired to calculate ALWIP prediction.

For larger shapes, the procedure is essentially the same and it is easyto check that the number of multiplications per sample is less thanfour.

For W×8 blocks with W>8, only horizontal interpolation is necessary asthe samples are given at the odd horizontal and each vertical positions.

Finally for W×4 blocks with W>8, let A_kbe the matrix that arises byleaving out every row that corresponds to an odd entry along thehorizontal axis of the downsampled block. Thus, the output size is 32and again, only horizontal interpolation remains to be performed.

The transposed cases are treated accordingly.

2.5.5 Single Step Linear Interpolation

For a W×H block with max(W, H)≥8, the prediction signal arises from thereduced prediction signal pred_(red) on W_(red)×H_(red) by linearinterpolation. Depending on the block shape, linear interpolation isdone in vertical, horizontal or both directions. If linear interpolationis to be applied in both directions, it is first applied in horizontaldirection if W<H and it is first applied in vertical direction, else.

Consider without loss of generality a W×H block with max(W, H)≥8 andW≥H. Then, the one-dimensional linear interpolation is performed asfollows. Without loss of generality, it suffices to describe linearinterpolation in vertical direction. First, the reduced predictionsignal is extended to the top by the boundary signal. Define thevertical upsampling factor U_(ver)=H/H_(red) and write U_(ver)=2^(u)^(ver) >1. Then, define the extended reduced prediction signal by

${{pre}{{d_{red}\lbrack x\rbrack}\left\lbrack {- 1} \right\rbrack}} = \left\{ {\begin{matrix}{{bdry}_{red}^{top}\lbrack x\rbrack} & {{{for}\mspace{14mu} W} = 8} \\{{bdry}_{redII}^{top}\lbrack x\rbrack} & {{{for}\mspace{14mu} W} > 8}\end{matrix}.} \right.$

Then, from this extended reduced prediction signal, the verticallylinear interpolated prediction signal is generated by

${pre{{d_{red}^{{ups},{ver}}\lbrack x\rbrack}\left\lbrack {{U_{ver} \cdot y} + k} \right\rbrack}} = {\left( {{\left( {U_{ver} - k - 1} \right) \cdot {{{pred}_{red}\lbrack x\rbrack}\left\lbrack {y - 1} \right\rbrack}} + {\left( {k + 1} \right) \cdot {{{pred}_{red}\lbrack x\rbrack}\lbrack y\rbrack}} + \frac{U_{ver}}{2}} \right) ⪢ u_{ver}}$  for   0 ≤ x < W_(red), 0 ≤ y < H_(red)  and  0 ≤ k < U_(ver).

2.5.6 Signalization of the Proposed Intra Prediction Modes

For each Coding Unit (CU) in intra mode, a flag indicating if an ALWIPmode is to be applied on the corresponding Prediction Unit (PU) or notis sent in the bitstream. The signalization of the latter index isharmonized with MRL in the same way as in JVET-M0043. If an ALWIP modeis to be applied, the index predmode of the ALWIP mode is signaled usinga MPM-list with 3 MPMS.

Here, the derivation of the MPMs is performed using the intra-modes ofthe above and the left PU as follows. There are three fixed tablesmap_angular_to_alwip_(idx), idx∈{0,1,2} that assign to each conventionalintra prediction mode predmode_(Angular) an ALWIP mode

predmode_(ALWIP)=map_angular_to_alwip_(idx)[predmode_(Angular)].

For each PU of width W and height H one defines an index

idx(PU)=idx(W,H)∈{0,1,2}

that indicates from which of the three sets the ALWIP-parameters are tobe taken as in Section 2.5.3.

If the above Prediction Unit PU_(above) is available, belongs to thesame CTU as the current PU and is in intra mode, ifidx(PU)=idx(PU_(above)) and if ALWIP is applied on PU_(above) withALWIP-mode predmode_(ALWIP) ^(above), one puts

mode_(ALWIP) ^(above)=predmode_(ALWIP) ^(above).

If the above PU is available, belongs to the same CTU as the current PUand is in intra mode and if a conventional intra prediction modepredmode_(Angular) ^(above) is applied on the above PU, one puts

mode_(ALWIP) ^(above)=map_angular_to_alwip_(idx(PU) _(above))[predmode_(Angular) ^(above)].

In all other cases, one puts

mode_(ALWIP) ^(above)=−1,

which means that this mode is unavailable. In the same way but withoutthe restriction that the left PU needs to belong to the same CTU as thecurrent PU, one derives a mode mode_(ALWIP) ^(left).

Finally, three fixed default lists list_(idx), idx∈{0,1,2} are provided,each of which contains three distinct ALWIP modes. Out of the defaultlist list_(idx(PU)) and the modes mode_(ALWIP) ^(above) and mode_(ALWIP)^(left), one constructs three distinct MPMs by substituting −1 bydefault values as well as eliminating repetitions.

The left neighboring block and above neighboring block used in the ALWIPMPM list construction is A1 and B1 as shown in FIG. 10.

2.5.7 Adapted MPM-List Derivation for Conventional Luma and ChromaIntra-Prediction Modes

The proposed ALWIP-modes are harmonized with the MPM-based coding of theconventional intra-prediction modes as follows. The luma and chromaMPM-list derivation processes for the conventional intra-predictionmodes uses fixed tables map_alwip_to_angular_(idx), idx∈{0,1,2}, mappingan ALWIP-mode predmode_(ALWIP) on a given PU to one of the conventionalintra-prediction modes

predmode_(Angular)=map_alwip_to_angular_(idx(PU))[predmode_(ALWIP)]

For the luma MPM-list derivation, whenever a neighboring luma block isencountered which uses an ALWIP-mode predmode_(ALWIP), this block istreated as if it was using the conventional intra-prediction modepredmode_(Angular). For the chroma MPM-list derivation, whenever thecurrent luma block uses an LWIP-mode, the same mapping is used totranslate the ALWIP-mode to a conventional intra prediction mode.

2.5.8 Corresponding Modified Working Draft

In some embodiments, as described in this section, portions related tointra_lwip_flag, intra_lwip_mpm_flag, intra_lwip_mpm_idx andintra_lwip_mpm remainder have been added to the working draft based onembodiments of the disclosed technology.

In some embodiments, as described in this section, the <begin> and <end>tags are used to denote additions and modifications to the working draftbased on embodiments of the disclosed technology.

Syntax Tables

Coding unit syntax coding_unit( x0, y0, cbWidth, cbHeight, treeType ) {Descriptor  if( tile_group_type != I | | sps_ibc_enabled_flag ) {   if(treeType != DUAL_TREE_CHROMA )    cu_skip_flag[ x0 ][ y0 ] ae(v)  if(cu_skip_flag[ x0 ][ y0 ] = = 0 && tile_group_type != I )   pred_mode_flag ae(v)  if( ( ( tile_group_type = = I && cu_skip_flag[x0 ][ y0 ] = =0 ) | |   ( tile_group_type != I && CuPredMode[ x0 ][ y0 ]!= MODE_   INTRA ) ) && sps_ibc_enabled_flag )   pred_mode_ibc_flagae(v)  }  if( CuPredMode[ x0 ][ y0 ] = = MODE_INTRA ) {   if(sps_pcm_enabled_flag &&    cbWidth >= MinIpcmCbSizeY && cbWidth <=MaxIpcmCbSizeY &&    cbHeight >= MinIpcmCbSizeY && cbHeight <=MaxIpcmCbSizeY )    pcm_flag[ x0 ][ y0 ] ae(v)   if( pcm_flag[ x0 ][ y0] ) {    while( !byte_aligned( ) )     pcm_alignment_zero_bit f(1)   pcm_sample( cbWidth, cbHeight, treeType)   } else {    if( treeType == SINGLE_TREE | | treeType = = DUAL_TREE_    LUMA ) {     if( Abs( Log2(cbWidth ) − Log2( cbHeight ) ) <= 2 )      intra_lwip_flag[ x0 ][ y0 ]ae(v     if( intra_lwip_flag[ x0 ][ y0 ] ) {      intra_lwip_mpm_flag[x0 ][ y0 ] ae(v)     if( intra_lwip_mpm_flag[ x0 ][ y0 ] )     intra_lwip_mpm_idx[ x0 ][ y0 ] ae(v)     else     intra_lwip_mpm_remainder[ x0 ][ y0 ] ae(v)    } else {     if( ( y0% CtbSizeY ) > 0 )      intra_luma_ref_idx[ x0 ][ y0 ] ae(v)     if(intra_luma_ref_idx[ x0 ][ y0 ] = = 0 &&      ( cbWidth <= MaxTbSizeY || cbHeight <= MaxTbSizeY ) &&      ( cbWidth * cbHeight > MinTbSizeY *MinTbSizeY ))      intra_subpartitions_mode_flag[ x0 ][ y0 ] ae(v)    if( intra_subpartitions_mode_flag[ x0 ][ y0 ] = = 1 &&      cbWidth<= MaxTbSizeY && cbHeight <= MaxTbSizeY )     intra_subpartitions_split_flag[ x0 ][ y0 ] ae(v)     if(intra_luma_ref_idx[ x0 ][ y0 ] = = 0 &&     intra_subpartitions_mode_flag[ x0 ][ y0 ] = = 0 )     intra_luma_mpm_flag[ x0 ][ y0 ] ae(v)     if( intra_luma_mpm_flag[x0 ][ y0 ] )      intra_luma_mpm_idx[ x0 ][ y0 ] ae(v)     else     intra_luma_mpm_remainder[ x0 ][ y0 ] ae(v)   }  }  if( treeType = =SINGLE_TREE | | treeType = = DUAL_TREE_CHROMA )  intra_chroma_pred_mode[ x0 ][ y0 ] ae(v)  } } else if( treeType !=DUAL_TREE_CHROMA ) { /* MODE_INTER or MODE_IBC */  ...

Semantics

<begin>intra_lwip_flag[ x0 ][ y0 ] equal to 1 specifies that the intraprediction type for luma samples is affine linear weighted intraprediction. intra_lwip_flag[ x0 ][ y0 ] equal to 0 specifies that theintra prediction type for luma samples is not affine linear weightedintra prediction. When intra_lwip_flag[ x0 ][ y0 ] is not present, it isinferred to be equal to 0. The syntax elements intra_lwip_mpm_flag[ x0][ y0 ], intra_lwip_mpm_idx[ x0 ][ y0 ] and intra_lwip_mpm_remainder [x0 ][ y0 ] specify the affine linear weighted intra prediction mode forluma samples. The array indices x0, y0 specify the location ( x0 , y0 )of the top-left luma sample of the considered coding block relative tothe top-left luma sample of the picture. When intra_lwip_mpm_flag[ x0 ][y0 ] is equal to 1, the affine linear weighted intra prediction mode isinferred from a neighboring intra-predicted coding unit according toclause 8.4.X. When intra_lwip_mpm_flag[ x0 ][ y0 ] is not present, it isinferred to be equal to 1.<end>intra_subpartitions_split_flag[x0][y0] specifies whether the intrasubpartitions split type is horizontal or vertical. Whenintra_subpartitions_split_flag[x0][y0] is not present, it is inferred asfollows:

-   -   If intra_lwip_flag[x0][y0] is equal to 1,        intra_subpartitions_split_flag[x0][y0] is inferred to be equal        to 0.    -   Otherwise, the following applies:        -   If cbHeight is greater than MaxTbSizeY,            intra_subpartitions_split_flag[x0][y0] is inferred to be            equal to 0.        -   Otherwise (cbWidth is greater than MaxTbSizeY),            intra_subpartitions_split_flag[x0][y0] is inferred to be            equal to 1.

Decoding Process 8.4.1 General Decoding Process for Coding Units Codedin Intra Prediction Mode

Inputs to this process are:

-   -   a luma location (xCb, yCb) specifying the top-left sample of the        current coding block relative to the top-left luma sample of the        current picture,    -   a variable cbWidth specifying the width of the current coding        block in luma samples,    -   a variable cbHeight specifying the height of the current coding        block in luma samples,    -   a variable treeType specifying whether a single or a dual tree        is used and if a dual tree is used, it specifies whether the        current tree corresponds to the luma or chroma components.        Output of this process is a modified reconstructed picture        before in-loop filtering.        The derivation process for quantization parameters as specified        in clause 8.7.1 is invoked with the luma location (xCb, yCb),        the width of the current coding block in luma samples cbWidth        and the height of the current coding block in luma samples        cbHeight, and the variable treeType as inputs.        When treeType is equal to SINGLE TREE or treeType is equal to        DUAL TREE LUMA, the decoding process for luma samples is        specified as follows:    -   If pcm_flag[xCb][yCb] is equal to 1, the reconstructed picture        is modified as follows:

S_(L)[xCb+i][yCb+j]=pcm_sample_luma[(cbHeight*j)+i]<<(BitDepth_(Y)−PcmBitDepth_(Y)),  (8-6)

-   -   with i=0 . . . cbWidth−1, j=0 . . . cbHeight−1    -   Otherwise, the following applies:    -   1. The luma intra prediction mode is derived as follows:        -   If intra_lwip_flag[xCb][yCb] is equal to 1, the derivation            process for the affine linear weighted intra prediction mode            as specified in clause 8.4.X is invoked with the luma            location (xCb, yCb), the width of the current coding block            in luma samples cbWidth and the height of the current coding            block in luma samples cbHeight as input.        -   Otherwise, the derivation process for the luma intra            prediction mode as specified in clause 8.4.2 is invoked with            the luma location (xCb, yCb), the width of the current            coding block in luma samples cbWidth and the height of the            current coding block in luma samples cbHeight as input.    -   2. The general decoding process for intra blocks as specified in        clause 8.4.4.1 is invoked with the luma location (xCb, yCb), the        tree type treeType, the variable nTbW set equal to cbWidth, the        variable nTbH set equal to cbHeight, the variable predModeIntra        set equal to IntraPredModeY[xCb][yCb], and the variable cIdx set        equal to 0 as inputs, and the output is a modified reconstructed        picture before in-loop filtering.        -   . . .

<begin> 8.4.X Derivation process for affine linear weighted intraprediction mode Input to this process are: - a luma location ( xCb , yCb) specifying the top-left sample of the current luma coding blockrelative to the  top-left luma sample of the current picture, - avariable cbWidth specifying the width of the current coding block inluma samples, - a variable cbHeight specifying the height of the currentcoding block in luma samples. In this process, the affine linearweighted intra prediction mode IntraPredModeY[ xCb ][ yCb ] is derived.IntraPredModeY[ xCb ][ yCb ] is derived by the following ordered steps: 1. The neighboring locations ( xNbA, yNbA ) and ( xNbB, yNbB ) are setequal to ( xCb − 1, yCb ) and   ( xCb, yCb − 1 ), respectively.  2. ForX being replaced by either A or B, the variables candLwipModeX arederived as follows:   - The availability derivation process for a blockas specified in clause 6.4.X [Ed. (BB): Neighboring blocks   availability checking process tbd] is invoked with the location (xCurr, yCurr ) set equal to ( xCb, yCb )    and the neighboring location( xNbY, yNbY ) set equal to ( xNbX, yNbX ) as inputs, and the output is   assigned to availableX.   - The candidate affine linear weightedintra prediction mode candLwipModeX is derived as follows:     - If oneor more of the following conditions are true, candLwipModeX is set equalto −1.        - The variable availableX is equal to FALSE.        -CuPredMode[ xNbX ][ yNbX ] is not equal to MODE_INTRA and mh_intra_flag[xNbX ][ yNbX ]         is not equal to 1.        - pcm_flag[ xNbX ][yNbX ] is equal to 1.        - X is equal to B and yCb − 1 is less than( ( yCb >> CtbLog2SizeY ) << CtbLog2SizeY ).     - Otherwise, thefollowing applies:        - The size type derivation process for a blockas specified in clause 8.4.X.1 is invoked with the         width of thecurrent coding block in luma samples cbWidth and the height of thecurrent coding         block in luma samples cbHeight as input, and theoutput is assigned to variable sizeId.        - If intra_lwip_flag[ xNbX][ yNbX ] is equal to 1, the size type derivation process for a block as        specified in clause 8.4.X.1 is invoked with the width of theneighboring coding block in luma         samples nbWidthX and the heightof the neighboring coding block in luma samples nbHeightX         asinput, and the output is assigned to variable sizeIdX.          - IfsizeId is equal to sizeIdX, candLwipModeX is set equal to           IntraPredModeY[ xNbX ][ yNbX ].          - Otherwise,candLwipModeX is set equal to −1.        - Otherwise, candLwipModeX isderived using IntraPredModeY[ xNbX ][ yNbX ] and sizeId as        specified in Table 8-X1.  3. The candLwipModeList[ x ] with x =0..2 is derived as follows, using lwipMpmCand[ sizeId ] as specified in  Table 8-X2:   - If candLwipModeA and candLwipModeB are both equal to−1, the following applies:       candLwipModeList[ 0 ] = lwipMpmCand[sizeId ][ 0 ]                 (8-X1)       candLwipModeList[ 1 ] =lwipMpmCand[ sizeId ][ 1 ]                 (8-X2)      candLwipModeList[ 2 ] = lwipMpmCand[ sizeId ][ 2]                 (8-X3)   - Otherwise, the following apllies:    - IfcandLwipModeA is equal to candLwipModeB or if either candLwipModeA orcandLwipModeB is       equal to −1, the following applies:       candLwipModeList[ 0 ] = ( candLwipModeA != −1) ? candLwipModeA :candLwipModeB (8-X4)       - If candLwipModeList[ 0 ] is equal tolwipMpmCand[ sizeId ][ 0 ], the following applies:          candLwipModeList[ 1 ] = lwipMpmCand[ sizeId ][ 1]             (8-X5)           candLwipModeList[ 2 ] = lwipMpmCand[sizeId ][ 2 ]             (8-X6)       - Otherwise, the followingapplies:           candLwipModeList[ 1 ] = lwipMpmCand[ sizeId ][ 0]             (8-X7)           candLwipModeList[ 2 ] = (candLwipModeList[ 0 ] != lwipMpmCand[ sizeId ][ 1 ] ) ?             lwipMpmCand[ sizeId ][ 1 ] : lwipMpmCand[ sizeId ][ 2 ]         (8-X8)    - Otherwise, the following applies:      candLwipModeList[ 0 ] = candLwipModeA                      (8-X9)      candLwipModeList[ 1 ] = candLwipModeB                     (8-X10)      - If candLwipModeA and candLwipModeB are both not equal tolwipMpmCand[ sizeId ][ 0 ], the        following applies:          candLwipModeList[ 2 ] = lwipMpmCand[ sizeId ][ 0 ]             (8-X11)       - Otherwise, the following applies:        -If candLwipModeA and candLwipModeB are both not equal to lwipMpmCand[sizeId ][ 1 ],           the following applies:            candLwipModeList[ 2 ] = lwipMpmCand[ sizeId ][ 1 ]           (8-X12)        - Otherwise, the following applies:            candLwipModeList[ 2 ] = lwipMpmCand[ sizeId ][ 2 ]           (8-X13)  4. IntraPredModeY[ xCb ][ yCb ] is derived byapplying the following procedure:   - If intra_lwip_mpm_flag[ xCb ][ yCb] is equal to 1, the IntraPredModeY[ xCb ][ yCb ] is set equal to   candLwipModeList[ intra_lwip_mpm_idx[ xCb ][ yCb ] ].   - Otherwise,IntraPredModeY[ xCb ][ yCb ] is derived by applying the followingordered steps:      1. When candLwipModeList[ i ] is greater thancandLwipModeList[ j ] for i = 0..1 and for each i,        j = ( i + 1)..2, both values are swapped as follows:          ( candLwipModeList[ i], candLwipModeList[ j ] ) = Swap( candLwipModeList[ i ],         candLwipModeList[ j ] )                           (8-X14)     2. IntraPredModeY[ xCb ][ yCb ] is derived by the following orderedsteps:        i. IntraPredModeY[ xCb ][ yCb ] is set equal tointra_lwip_mpm_remainder[ xCb ][ yCb ].        ii. For i equal to 0 to2, inclusive, when IntraPredModeY[ xCb ][ yCb ] is greater than or equal         to candLwipModeList[ i ], the value of IntraPredModeY[ xCb ][yCb ] is incremented by one. The variable IntraPredModeY[ x ][ y ] withx = xCb..xCb + cbWidth − 1 and y = yCb..yCb + cbHeight − 1 is set to beequal to IntraPredModeY[ xCb ][ yCb ]. 8.4.X.1 Derivation process forprediction block size type Input to this process are: - a variablecbWidth specifying the width of the current coding block in lumasamples, - a variable cbHeight specifying the height of the currentcoding block in luma samples. Output of this process is a variablesizeId. The variable sizeId is derived as follows: - If both cbWidth andcbHeight are equal to 4, sizeId is set equal to 0. - Otherwise, if bothcbWidth and cbHeight are less than or equal to 8, sizeId is set equalto 1. - Otherwise, sizeId is set equal to 2. Table 8-X1 - Specificationof mapping between intra prediction and affine linear weighted intraprediction modes block size type sizeId IntraPredModeY[ xNbX ][ yNbX ] 01 2 0 17 0 5 1 17 0 1 2, 3 17 10 3 4, 5 9 10 3 6, 7 9 10 3 8, 9 9 10 310, 11 9 10 0 12, 13 17 4 0 14, 15 17 6 0 16, 17 17 7 4 18, 19 17 7 420, 21 17 7 4 22, 23 17 5 5 24, 25 17 5 1 26, 27 5 0 1 28, 29 5 0 1 30,31 5 3 1 32, 33 5 3 1 34, 35 34 12 6 36, 37 22 12 6 38, 39 22 12 6 40,41 22 12 6 42, 43 22 14 6 44, 45 34 14 10 46, 47 34 14 10 48, 49 34 16 950, 51 34 16 9 52, 53 34 16 9 54, 55 34 15 9 56, 57 34 13 9 58, 59 26 18 60, 61 26 1 8 62, 63 26 1 8 64, 65 26 1 8 66 26 1 8 Table 8-X2 -Specification of affine linear weighted intra prediction candidate modescandidate mode 0 1 2 lwipMpmCand[ 0 ] 17 34 5 lwipMpmCand[ 1 ] 0 7 16lwipMpmCand[ 2 ] 1 4 6 <end>

8.4.2. Derivation Process for Luma Intra Prediction Mode

Input to this process are:

-   -   a luma location (xCb, yCb) specifying the top-left sample of the        current luma coding block relative to the top-left luma sample        of the current picture,    -   a variable cbWidth specifying the width of the current coding        block in luma samples,    -   a variable cbHeight specifying the height of the current coding        block in luma samples.        In this process, the luma intra prediction mode        IntraPredModeY[xCb][yCb] is derived.        Table 8-1 specifies the value for the intra prediction mode        IntraPredModeY[xCb][yCb] and the associated names.

TABLE 8-1 Specification of intra prediction mode and associated namesIntro prediction mode Associated name 0 INTRA_ PLANAR 1 INTRA_DC 2 . . .66 INTRA_ANGULAR2 . . . INTRA_ANGULAR66 81 . . . 83 INTRA_LT_CCLM,INTRA_L_ CCLM, INTRA_T_CCLM NOTE-: The intra prediction modesINTRA_LT_CCLM, INTRA_L_CCLM and INTRA_T_CCLM are only applicable tochroma components.IntraPredModeY[xCb][yCb] is derived by the following ordered steps:

-   -   1. The neighboring locations (xNbA, yNbA) and (xNbB, yNbB) are        set equal to (xCb−1, yCb+cbHeight−1) and (xCb+cbWidth−1, yCb−1),        respectively.    -   2. For X being replaced by either A or B, the variables        candIntraPredModeX are derived as follows:        -   The availability derivation process for a block as specified            in clause <begin>6.4.X (Ed. (BB): Neighboring blocks            availability checking process tbd] <end> is invoked with the            location (xCurr, yCurr) set equal to (xCb, yCb) and the            neighboring location (xNbY, yNbY) set equal to (xNbX, yNbX)            as inputs, and the output is assigned to availableX.        -   The candidate intra prediction mode candIntraPredModeX is            derived as follows:            -   If one or more of the following conditions are true,                candIntraPredModeX is set equal to INTRA_PLANAR.                -   The variable availableX is equal to FALSE.                -   CuPredMode[xNbX][yNbX] is not equal to MODE_INTRA                    and ciip_flag[xNbX][yNbX] is not equal to 1.                -   pcm_flag[xNbX][yNbX] is equal to 1.                -   X is equal to B and yCb−1 is less than ((yCb>>CtbLog                    2SizeY)<<CtbLog 2SizeY).            -   Otherwise, candIntraPredModeX is derived as follows:                -   If intra_lwip_flag[xCb yCb] is equal to 1,                    candIntraPredModeX is derived by the following                    ordered steps:                -    i. The size type derivation process for a block as                    specified in clause 8.4.X.1 is invoked with the                    width of the current coding block in luma samples                    cbWidth and the height of the current coding block                    in luma samples cbHeight as input, and the output is                    assigned to variable sizeId.                -    ii. candIntraPredModeX is derived using                    IntraPredModeY[xNbX][yNbX] and sizeId as specified                    in Table 8-X3.            -   Otherwise, candIntraPredModeX is set equal to                IntraPredModeY[xNbX][yNbX].    -   3. The variables ispDefaultMode1 and ispDefaultMode2 are defined        as follows:        -   If IntraSubPartitionsSplitType is equal to ISP_HOR_SPLIT,            ispDefaultMode1 is set equal to INTRA_ANGULAR18 and            ispDefaultMode2 is set equal to INTRA_ANGULAR5.        -   Otherwise, ispDefaultMode1 is set equal to INTRA_ANGULAR50            and ispDefaultMode2 is set equal to INTRA_ANGULAR63.

TABLE 8-X3 Specification of mapping between affine linear weighted intraprediction and intra prediction modes IntraPredModeY block size typesizeld [ xNbX ][ yNbX ] 0 1 2 0 0 0 1 1 18 1 1 2 18 0 1 3 0 1 1 4 18 018 5 0 22 0 6 12 18 1 7 0 18 0 8 18 1 1 9 2 0 50 10 18 1 0 11 12 0 12 181 13 18 0 14 1 44 15 18 0 16 18 50 17 0 1 18 0 0 19 50 20 0 21 50 22 023 56 24 0 25 50 26 66 27 50 28 56 29 50 30 50 31 1 32 50 33 50 34 50

8.4.3 Derivation Process for Chroma Intra Prediction Mode

Input to this process are:

-   -   a luma location (xCb, yCb) specifying the top-left sample of the        current chroma coding block relative to the top-left luma sample        of the current picture,    -   a variable cbWidth specifying the width of the current coding        block in luma samples,    -   a variable cbHeight specifying the height of the current coding        block in luma samples.        In this process, the chroma intra prediction mode        IntraPredModeC[xCb][yCb] is derived.        The corresponding luma intra prediction mode lumaIntraPredMode        is derived as follows:    -   If intra_lwip_flag[xCb][yCb] is equal to 1, lumaIntraPredMode is        derived by the following ordered steps:        -   i. The size type derivation process for a block as specified            in clause 8.4.X.1 is invoked with the width of the current            coding block in luma samples cbWidth and the height of the            current coding block in luma samples cbHeight as input, and            the output is assigned to variable sizeId.        -   ii. The luma intra prediction mode is derived using            IntraPredModeY[xCb+cbWidth/2][yCb+cbHeight/2]and sizeId as            specified in Table 8-X3 and assigning the value of            candIntraPredModeX to lumaIntraPredMode.    -   Otherwise, lumaIntraPredMode is set equal to        IntraPredModeY[xCb+cbWidth/2][yCb+cbHeight/2].        The chroma intra prediction mode IntraPredModeC[xCb][yCb] is        derived using intra_chroma_pred_mode[xCb][yCb] and        lumaIntraPredMode as specified in Table 8-2 and Table 8-3.        . . .

xxx. Intra sample prediction <begin> Inputs to this process are: - asample location ( xTbCmp, yTbCmp ) specifying the top-left sample of thecurrent transform block relative to  the top-left sample of the currentpicture, - a variable predModeIntra specifying the intra predictionmode, - a variable nTbW specifying the transform block width, - avariable nTbH specifying the transform block height, - a variable nCbWspecifying the coding block width, - a variable nCbH specifying thecoding block height, - a variable cIdx specifying the colour componentof the current block. Outputs of this process are the predicted samplespredSamples[ x ][ y ], with x = 0..nTbW − 1, y = 0..nTbH − 1. Thepredicted samples predSamples[ x ][ y ] are derived as follows: - Ifintra_lwip_flag[ xTbCmp ][ yTbCmp ] is equal to 1 and cIdx is equal to0, the affine linear weighted intra  sample prediction process asspecified in clause 8.4.4.2.X1 is invoked with the location ( xTbCmp,yTbCmp ), the  intra prediction mode predModeIntra, the transform blockwidth nTbW and height nTbH as inputs, and the  output is predSamples. -Otherwise, the general intra sample prediction process as specified inclause 8.4.4.2.X1. is invoked with the  location ( xTbCmp, yTbCmp ), theintra prediction mode predModeIntra, the transform block width nTbW and height nTbH, the coding block width nCbW and height nCbH, and thevariable cIdx as inputs, and the output is  predSamples.8.4.4.2.X1Affine linear weighted intra sample prediction Inputs to thisprocess are: - a sample location ( xTbCmp, yTbCmp ) specifying thetop-left sample of the current transform block relative to  the top-leftsample of the current picture, - a variable predModeIntra specifying theintra prediction mode, - a variable nTbW specifying the transform blockwidth, - a variable nTbH specifying the transform block height. Outputsof this process are the predicted samples predSamples[ x ][ y ], with x= 0..nTbW − 1, y = 0..nTbH − 1. The size type derivation process for ablock as specified in clause 8.4.X.1 is invoked with the transform blockwidth nTbW and the transform block height nTbH as input, and the outputis assigned to variable sizeId. Variables numModes, boundarySize, predW,predH and predC are derived using sizeId as specified in Table 8-X4.Table 8-X4 - Specification of number of modes, boundary sample size andprediction sizes depending on sizeId sizeId numModes boundarySize predWpredH predC 0 35 2 4 4 4 1 19 4 4 4 4 2 11 4 Min( nTbW, 8 ) Min( nTbH, 8) 8 The flag isTransposed is derived as follows:    isTransposed = (predModeIntra > ( numModes / 2 ) ) ? 1 : 0                   (8-X15) Theflags needUpsBdryHor and needUpsBdryVer are derived as follows:   needUpsBdryHor = ( nTbW > predW ) ? TRUE : FALSE(8-X16)   needUpsBdryVer = ( nTbH > predH ) ? TRUE : FALSE(8-X17) The variablesupsBdryW and upsBdryH are derived as follows:    upsBdryW = ( nTbH >nTbW ) ? nTbW : predW                       (8-X18)    upsBdryH = (nTbH > nTbW ) ? predH : nTbH                       (8-X19) The variableslwipW and lwipH are derived as follows:    lwipW = ( isTransposed = = 1)? predH : predW                        (8-X20)    lwipH = ( isTransposed= = 1) ? predW : predH                        (8-X21) For the generationof the reference samples refT[ x ] with x = 0..nTbW − 1 and refL[ y ]with y = 0..nTbH − 1, the reference sample derivation process asspecified in clause 8.4.4.2.X2 is invoked with the sample location (xTbCmp, yTbCmp ), the transform block width nTbW, the transform blockheight nTbH as inputs, and top and left reference samples refT[ x ] withx = 0..nTbW − 1 and refL[ y ] with y = 0..nTbH − 1, respectively, asoutputs. For the generation of the boundary samples p[ x ] with x =0..2 * boundarySize − 1, the following applies: - The boundary reductionprocess as specified in clause 8.4.4.2.X3 is invoked for the topreference samples with  the block size nTbW, the reference samples refT,the boundary size boundarySize, the upsampling boundary flag needUpsBdryVer, and the upsampling boundary size upsBdryW as inputs,and reduced boundary samples  redT[ x ] with x = 0..boundarySize − 1 andupsampling boundary samples upsBdryT[ x ] with x = 0..upsBdryW − 1  asoutputs. - The boundary reduction process as specified in clause8.4.4.2.X3 is invoked for the left reference samples with  the blocksize nTbH, the reference samples refL, the boundary size boundarySize,the upsampling boundary flag  needUpsBdryHor, and the upsamplingboundary size upsBdryH as inputs, and reduced boundary samples  redL[ x] with x = 0..boundarySize − 1 and upsampling boundary samples upsBdryL[x ] with x = 0..upsBdryH − 1  as outputs. - The reduce top and leftboundary samples redT and redL are assigned to the boundary sample arrayp as  follows:  - If isTransposed is equal to 1, p[ x ] is set equal toredL[ x ] with x = 0..boundarySize − 1 and p[ x +    boundarySize ] isset equal to redT[ x ] with x = 0..boundarySize − 1.  - Otherwise, p[ x] is set equal to redT[ x ] with x = 0..boundarySize − 1 and p[ x +boundarySize ] is set equal    to redL[ x ] with x = 0..boundarySize− 1. For the intra sample prediction process according to predModeIntra,the following ordered steps apply:  1. The affine linear weightedsamples predLwip[ x ][ y ], with x = 0..lwipW − 1, y = 0..lwipH − 1 arederived as     follows:     - The variable modeId is derived as follows:        modeId = predModeIntra − ( isTransposed = = 1) ? ( numModes / 2) : 0         (8-X22)     - The weight matrix mWeight[ x ][ y ] with x =0..2 * boundarySize − 1, y = 0..predC * predC − 1is        derived usingsizeId and modeId as specified in Table 8-XX [TBD: add weight matrices].    - The bias vector vBias[ y ] with y = 0..predC * predC − 1 isderived using sizeId and modeId as specified        in Table 8-XX [TBD:add bias vectors].     - The variable sW is derived using sizeId andmodeId as specified in Table 8-X5.     - The affine linear weightedsamples predLwip[ x ][ y ], with x = 0..lwipW − 1, y = 0..lwipH − 1 are       derived as follows:         oW = 1 << ( sW − 1 )                            (8-X23)         sB = BitDepth_(γ) − 1                             (8-X24)         incW = ( predC > lwipW ) ?2 : 1                         (8-X25)         incH = ( predC > lwipH ) ?2 : 1                        (8-X26)         predLwip[ x ][ y ] = ((Σ_(i = 0) ^(2 + boundarySize −1) mWeight[ i ][ y * incH * predC + x *incW ] * p[ i ]) +          ( vBias[ y * incH * predC + x * incW ] << sB) + oW ) >> sW           (8-X27)  2. The predicted samples predSamples[x ][ y ], with x = 0..nTbW − 1, y = 0..nTbH − 1 are derived as follows:    - When isTransposed is equal to 1, predLwip[ x ][ y ], with x =0..predW − 1, y = 0..predH − 1 is set equal        to predLwip[ y ][ x].     - If needUpsBdryVer is equal to TRUE or needUpsBdryHor is equalto TRUE, the prediction upsampling        process as specified in clause8.4.4.2.X4 is invoked with the input block width predW, the input block       height predH, affine linear weighted samples predLwip, thetransform block width nTbW, the        transform block height nTbH, theupsampling boundary width upsBdryW, the upsampling boundary       height upsBdryH, the top upsampling boundary samples upsBdryT,and the left upsampling boundary        samples upsBdryL as inputs, andthe output is the predicted sample array predSamples.     - Otherwise,predSamples[ x ][ y ], with x = 0..nTbW − 1, y = 0..nTbH − 1 is setequal to predLwip[ x ][ y ]. Table 8-X5 - Specification of weight shiftssW depending on sizeId and modeId modeId sizeId 0 1 2 3 4 5 6 7 8 9 1011 12 13 14 15 16 17 0 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 1 8 8 8 9 8 88 8 9 8 2 8 8 8 8 8 8 8.4.4.2.X2Reference sample derivation processInputs to this process are: - a sample location ( xTbY, yTbY )specifying the top-left luma sample of the current transform blockrelative to  the top-left luma sample of the current picture, - avariable nTbW specifying the transform block width, - a variable nTbHspecifying the transform block height. Outputs of this process are thetop and left reference samples refT[ x ] with x = 0..nTbW − 1 and refL[y ] with y = 0..nTbH − 1, respectively. The neighboring samples refT[ x] with x = 0..nTbW − 1 and refL[ y ] with y = 0..nTbH − 1 areconstructed samples prior to the in-loop filter process and derived asfollows: - The top and left neighboring luma locations ( xNbT, yNbT )and ( xNbL, yNbL ) are specified by:    ( xNbT, yNbT ) = ( xTbY + x,yTbY − 1 )                          (8-X28)    ( xNbL, yNbL ) = ( xTbY −1, yTbY + y )                          (8-X29) - The availabilityderivation process for a block as specified in clause 6.4.X [Ed. (BB):Neighboring blocks  availability checking process tbd] is invoked withthe current luma location ( xCurr, yCurr ) set equal to  ( xTbY, yTbY )and the top neighboring luma location ( xNbT, yNbT ) as inputs, and theoutput is assigned to  availTop[ x ] with x = 0..nTbW − 1. - Theavailability derivation process for a block as specified in clause 6.4.X[Ed. (BB): Neighboring blocks  availability checking process tbd] isinvoked with the current luma location ( xCurr, yCurr ) set equal to  (xTbY, yTbY ) and the left neighboring luma location ( xNbL, yNbL ) asinputs, and the output is assigned to  availLeft[ y ] with y = 0..nTbH− 1. - The top reference samples refT[ x ] with x = 0..nTbW − 1 arederived as follows:   - If all availTop[ x ] with x = 0..nTbW − 1 areequal to TRUE, the sample at the location ( xNbT, yNbT ) is     assignedto refT[ x ] with x = 0..nTbW − 1.   - Otherwise, if availTop[ 0 ] isequal to FALSE, all refT[ x ] with x = 0..nTbW − 1 are set equal to    1 << ( BitDepth_(γ) − 1 ).   - Otherwise, reference samples refT[ x] with x = 0..nTbW − 1 are derived by the following ordered steps:     1. The variable lastT is set equal to the position x of the firstelement in the sequence availTop[ x ] with        x = 1..nTbW − 1 thatis equal to FALSE.      2. For every x = 0..lastT − 1, the sample at thelocation ( xNbT, yNbT ) is assigned to refT[ x ].      3. For every x =lastT..nTbW − 1, refT[ x ] is set equal to refT[ lastT − 1 ]. - The leftreference samples refL[ y ] with x = 0..nTbH − 1 are derived as follows:  - If all availLeft[ y ] with y = 0..nTbH − 1 are equal to TRUE, thesample at the location ( xNbL, yNbL ) is     assigned to refL[ y ] withy = 0..nTbH − 1.   - Otherwise, if availLeft[ 0 ] is equal to FALSE, allrefL[ y ] with y = 0..nTbH − 1 are set equal to     1 << ( BitDepth_(γ)− 1 ).   - Otherwise, reference samples refL[ y ] with y = 0..nTbH − 1are derived by the following ordered steps:      1. The variable lastLis set equal to the position y of the first element in the sequenceavailLeft[ y ] with        y = 1..nTbH − 1 that is equal to FALSE.     2. For every y = 0..lastL − 1, the sample at the location ( xNbL,yNbL ) is assigned to refL[ y ].      3. For every y = lastL..nTbH − 1,refL[ y ] is set equal to refL[ lastL − 1 ]. Specification of theboundary reduction process Inputs to this process are: - a variable nTbXspecifying the transform block size, - reference samples refX[ x ] withx = 0..nTbX − 1, - a variable boundarySize specifying the downsampledboundary size, - a flag needUpsBdryX specifying whether intermediateboundary samples are required for upsampling, - a variable upsBdrySizespecifying the boundary size for upsampling. Outputs of this process arethe reduced boundary samples redX[ x ] with x = 0..boundarySize − 1 andupsampling boundary samples upsBdryX[ x ] with x = 0..upsBdrySize − 1.The upsampling boundary samples upsBdryX[ x ] with x = 0..upsBdrySize −1 are derived as follows: - If needUpsBdryX is equal to TRUE andupsBdrySize is less than nTbX, the following applies:    uDwn = nTbX /upsBdrySize                               (8-X30)    upsBdryX[ x ] = (Σ_(i = 0) ^(uDwn −1) refX[ x * uDwn + i ] + ( 1 << ( Log2( uDwn ) − 1 ))) >> Log2( uDwn ) (8-X31) - Otherwise (upsBdrySize is equal to nTbX),upsBdryX[ x ] is set equal to refX[ x ]. The reduced boundary samplesredX[ x ] with x = 0..boundarySize − 1 are derived as follows: - IfboundarySize is less than upsBdrySize, the following applies:    bDwn =upsBdrySize / boundarySize                           (8-X32)    redX[ x] = ( Σ_(i = 0) ^(bDwn −1) upsBdryX[ x * bDwn + i ] + ( 1 << ( Log2(bDwn ) − 1 ) )) >> Log2( bDwn ) (8-X33) - Otherwise (boundarySize isequal to upsBdrySize), redX[ x ] is set equal to upsBdryX[ x ].8.4.4.2.X4Specification of the prediction upsampling process Inputs tothis process are: - a variable predW specifying the input block width, -a variable predH specifying the input block height, - affine linearweighted samples predLwip[ x ][ y ], with x = 0..predW − 1, y = 0..predH− 1, - a variable nTbW specifying the transform block width, - avariable nTbH specifying the transform block height, - a variableupsBdryW specifying the upsampling boundary width, - a variable upsBdryHspecifying the upsampling boundary height, - top upsampling boundarysamples upsBdryT[ x ] with x = 0..upsBdryW − 1, - left upsamplingboundary samples upsBdryL[ x ] with x = 0..upsBdryH − 1. Outputs of thisprocess are the predicted samples predSamples[ x ][ y ], with x =0..nTbW − 1, y = 0..nTbH − 1. The sparse predicted samples predSamples[m ][ n ] are derived from predLwip[ x ][ y ], with x = 0..predW − 1, y =0..predH − 1 as follows:    upHor = nTbW /predW                                (8-X34)    upVer = nTbH / predH                                 (8-X35)    predSamples[ ( x + 1 ) *upHor − 1 ][ ( y + 1 ) * upVer − 1 ] = predLwip[ x ][ y ]         (8-X36) The top boundary samples upsBdryT[ x ] with x =0..upsBdryW − 1 are assigned to predSamples[ m ][ −1 ] as follows:   predSamples[ ( x + 1) * ( nTbW / upsBdryW ) − 1 ][ −1 ] = upsBdryT[ x]            (8-X37) The left boundary samples upsBdryL[ y ] with y =0..upsBdryH − 1 are assigned to predSamples[ −1 ][ n ] as follows:   predSamples[ −1 ][ ( y +1 ) * ( nTbH / upsBdryH ) − 1 ] = upsBdryL[ y]              (8-X38) The predicted samples predSamples[ x ][ y ], withx = 0..nTbW − 1, y = 0..nTbH − 1 are derived as follows: - If nTbH isgreater than nTbW, the following ordered steps apply:  1. When upHor isgreater than 1, hoizontal upsampling for all sparse positions ( xHor,yHor ) = ( m * upHor −      1, n * upVer − 1 ) with m = 0..predW − 1, n= 1..predH is applied with dX = 1..upHor − 1 as follows:      predSamples[ xHor + dX ][ yHor ] = ( ( upHor − dX ) * predSamples[xHor ][ yHor ] +       dX * predSamples[ xHor + upHor ][ yHor ] ) /upHor                 (8-X39)  2. Vertical upsampling for all sparsepositions ( xVer, yVer ) = ( m, n * upVer − 1 ) with m = 0..nTbW − 1,    n = 0..predH − 1 is applied with dY = 1..upVer − 1 as follows:      predSamples[ xVer ][ yVer + dY ] = ( ( upVer − dY ) * predSamples[xVer ][ yVer ] +       dY * predSamples[ xVer ][ yVer + upVer ] ) /upVer                 (8-X40) - Otherwise, the following ordered stepsapply:  1. When upVer is greater than 1, vertical upsampling for allsparse positions ( xVer, yVer ) = ( m * upHor − 1,     n * upVer − 1 )with m = 1..predW, n = 0..predH − 1 is applied with dY = 1..upVer − 1 asspecified in (8-X40).  2. Horizontal upsampling for all sparse positions( xHor, yHor ) = ( m * upHor − 1, n ) with m = 0..predW − 1,     n =0..nTbH − 1 is applied with dX = 1..upHor − 1 as specified in (8-X39).<end>

TABLE 9-9 Syntax elements and associated binarizations SyntaxBinarization structure Syntax element Process Input parameterscoding_unit( ) cu_skip_flag[ ][ ] FL cMax = 1 pred_mode_ibc_flag FL cMax= 1 pred_mode_flag FL cMax = 1 <begin>intra_lwip_flag[ ][ ] FL cMax = 1intra_lwip_mpm_flag[ ][ ] FL cMax = 1 intra_lwip_mpm_idx[ ][ ] TR cMax =2, cRiceParam = 0 intra_lwip_mpm_remainder[ ][ ] FL cMax = (cbWidth = =4 && . . . cbHeight = = 4) ? 31 : ( (cbWidth <= 8&& cbHeight <= 8) ? 15:7)

TABLE 9-15 Assignment of ctxInc to syntax elements with context codedbins binIdx Syntax element 0 1 2 3 4 >=5 ... terminate na na na na naintra_lwip_flag[ ][ ] (Abs( Log2(cbWidth) − na na na na naLog2(cbHeight) ) > 1) ? 3 : ( 0,1,2 (clause 9.5.4.2.2) )intra_lwip_mpm_flag[ ][ ] 0 na na na na na intra_lwip_mpm_idx[ ][ ]bypass bypass na na na na intra_lwip_mpm_remainder[ ][ ] bypass bypassbypass bypass bypass na

TABLE 9-16 Specification of ctxInc using left and above syntax elementsSyntax element condL condA ctxSetIdx . . . intra_lwip_flagintra_lwip_flag intra_lwip_flag 0 [ x0 ][ y0 ] [ xNbL ][ yNbL ] [ xNbA][ yNbA ] . . .<end>

Summary of ALWIP

For predicting the samples of a rectangular block of width W and heightH, affine linear weighted intra prediction (ALWIP) takes one line of Hreconstructed neighboring boundary samples left of the block and oneline of W reconstructed neighboring boundary samples above the block asinput. If the reconstructed samples are unavailable, they are generatedas it is done in the conventional intra prediction. ALWIP is onlyapplied to luma intra block. For chroma intra block, the conventionalintra coding modes are applied.

The generation of the prediction signal is based on the following threesteps:

-   -   1. Out of the boundary samples, four samples in the case of        W=H=4 and eight samples in all other cases are extracted by        averaging.    -   2. A matrix vector multiplication, followed by addition of an        offset, is carried out with the averaged samples as an input.        The result is a reduced prediction signal on a subsampled set of        samples in the original block.    -   3. The prediction signal at the remaining positions is generated        from the prediction signal on the subsampled set by linear        interpolation which is a single step linear interpolation in        each direction.

If an ALWIP mode is to be applied, the index predmode of the ALWIP modeis signaled using a MPM-list with 3 MPMS. Here, the derivation of theMPMs is performed using the intra-modes of the above and the left PU asfollows. There are three fixed tables map_angular_to_alwip_(idx),idx∈{0,1,2} that assign to each conventional intra prediction modepredmode_(Angular) an ALWIP mode

predmode_(ALWIP)=map_angular_to_alwip_(idx)[predmode_(Angular)].

For each PU of width W and height H one defines an index

idx(PU)=idx(W,H)∈{0,1,2}

that indicates from which of the three sets the ALWIP-parameters are tobe taken.

If the above Prediction Unit PU_(above) is available, belongs to thesame CTU as the current PU and is in intra mode, if idx(PU)=idx(PUabove) above) and if ALWIP is applied on PU_(above) with ALWIP-modepredmode_(ALWIP) ^(above).

mode_(ALWIP) ^(above)=predmode_(ALWIP) ^(above).

If the above PU is available, belongs to the same CTU as the current PUand is in above intra mode and if a conventional intra prediction modepredmode_(Angular) ^(above) is applied on the above PU, one puts

mode_(ALWIP) ^(above)=map_angular_to_alwip_(idx(PU) _(above))[predmode_(Angular) ^(above)].

In all other cases, one puts

mode_(ALWIP) ^(above)=−1

which means that this mode is unavailable. In the same way but withoutthe restriction that the left PU needs to belong to the same CTU as thecurrent PU, one derives a mode mode_(ALWIP) ^(left).

Finally, three fixed default lists list_(idx), idx∈{0,1,2} are provided,each of which contains three distinct ALWIP modes. Out of the defaultlist list_(idx(PU)) and the modes mode_(ALWIP) ^(above) and mode_(ALWIP)^(left), one constructs three distinct MPMs by substituting−1 by defaultvalues as well as eliminating repetitions.

For the luma MPM-list derivation, whenever a neighboring luma block isencountered which uses an ALWIP-mode predmode_(ALWIP), this block istreated as if it was using the conventional intra-prediction modepredmode_(Angular).

predmode_(Angular)=map_alwip_to_angular_(idx(PU))[predmode_(ALWIP)]

3 TRANSFORM IN VVC 3.1 Multiple Transform Selection (MTS)

In addition to DCT-II which has been employed in HEVC, a MultipleTransform Selection (MTS) scheme is used for residual coding both interand intra coded blocks. It uses multiple selected transforms from theDCT8/DST7. The newly introduced transform matrices are DST-VII andDCT-VIII.

3.2 Reduced Secondary Transform (RST) Proposed in JVET-N0193

Reduced secondary transform (RST) applies 16×16 and 16×64 non-separabletransform for 4×4 and 8×8 blocks, respectively. Primary forward andinverse transforms are still performed the same way as two 1-Dhorizontal/vertical transform passes. Secondary forward and inversetransforms are a separate process step from that of primary transforms.For encoder, primary forward transform is performed first, then followedby secondary forward transform and quantization, and CABAC bit encoding.For decoder, CABAC bit decoding and inverse quantization, then Secondaryinverse transform is performed first, then followed by primary inversetransform. RST applies only to intra coded TUs in both intra slice andinter slices.

3.3 A Unified MPM List for Intra Mode Coding in JVET-N0185

A unified 6-MPM list is proposed for intra blocks irrespective ofwhether Multiple Reference Line (MRL) and Intra sub-partition (ISP)coding tools are applied or not. The MPM list is constructed based onintra modes of the left and above neighboring block as in VTM4.0.Suppose the mode of the left is denoted as Left and the mode of theabove block is denoted as Above, the unified MPM list is constructed asfollows:

-   -   When a neighboring block is not available, its intra mode is set        to Planar by default.    -   If both modes Left and Above are non-angular modes:    -   a. MPM list→{Planar, DC, V, H, V−4, V+4}    -   If one of modes Left and Above is angular mode, and the other is        non-angular:    -   a. Set a mode Max as the larger mode in Left and Above    -   b. MPM list→{Planar, Max, DC, Max−1, Max+1, Max−2}    -   If Left and Above are both angular and they are different:    -   a. Set a mode Max as the larger mode in Left and Above    -   b. if the difference of mode Left and Above is in the range of 2        to 62, inclusive        -   i. MPM list→{Planar, Left, Above, DC, Max−1, Max+1}    -   c. Otherwise        -   i. MPM list→{Planar, Left, Above, DC, Max−2, Max+2}    -   If Left and Above are both angular and they are the same:    -   a. MPM list→{Planar, Left, Left−1, Left+1, DC, Left−2}

Besides, the first bin of the MPM index codeword is CABAC context coded.In total three contexts are used, corresponding to whether the currentintra block is MRL enabled, ISP enabled, or a normal intra block.

The left neighboring block and above neighboring block used in theunified MPM list construction is A2 and B2 as shown in FIG. 10.

One MPM flag is firstly coded. If the block is coded with one of mode inthe MPM list, an MPM index is further coded. Otherwise, an index to theremaining modes (excluding MPMs) is coded.

4 EXAMPLES OF DRAWBACKS IN EXISTING IMPLEMENTATIONS

The design of ALWIP in JVET-N0217 has the following problems:

-   -   1) At the March 2019 JVET meeting, a unified 6-MPM list        generation was adopted for MRL mode, ISP mode, and normal intra        mode. But the affine linear weighted prediction mode uses a        different 3-MPM list construction which makes the MPM list        construction complicated. A complex MPM list construction might        compromise the throughput of the decoder, in particular for        small blocks such as 4×4 samples.    -   2) ALWIP is only applied to luma component of the block. For the        chroma component of an ALWIP coded block, a chroma mode index is        coded and sent to decoder, which could result in unnecessary        signaling.    -   3) The interactions of ALWIP with other coding tools should be        considered.    -   4) When calculating upsBdryX in upsBdryX[x]=(Σ_(i=0)        ^(uDwn−1)refX[x*uDwn+i]+(1<<(Log 2(uDwn)−1)))>>Log 2(uDwn)        (8-X31), it is possible that Log 2(uDwn)−1 is equal to −1, while        left shifted with −1 is undefined.    -   5) When upsampling the prediction samples, no rounding is        applied.    -   6) In the deblocking process, ALWIP coded blocks are treated as        normal intra-blocks.    -   7) Too many contexts (e.g., 4) are used in coding ALWIP flag        (e.g., intra_lwip_flag).    -   8) When both vertical up-sampling and horizontal up-sampling are        required, the up-sampling order depends on block shape. This is        not hardware friendly.    -   9) Linear interpolation filter is used for up-sampling, which        may be inefficient.    -   10) The two-stage downsampling method utilized in ALWIP may        cause unnecessary computational complexity. In addition, using        the downsampled reference samples to generate the upsampled        prediction block may be inaccurate.

5 EXEMPLARY METHODS FOR MATRIX-BASED INTRA CODING

Embodiments of the presently disclosed technology overcome drawbacks ofexisting implementations, thereby providing video coding with highercoding efficiencies but lower computational complexity. Matrix-basedintra prediction methods for video coding, and as described in thepresent document, may enhance both existing and future video codingstandards, is elucidated in the following examples described for variousimplementations. The examples of the disclosed technology provided belowexplain general concepts, and are not meant to be interpreted aslimiting. In an example, unless explicitly indicated to the contrary,the various features described in these examples may be combined.

In the following discussion, an intra-prediction mode refers to anangular intra prediction mode (including DC, planar, CCLM and otherpossible intra prediction modes); while an intra mode refers to normalintra mode, or MRL, or ISP or ALWIP.

In the following discussion, “Other intra modes” may refer to one ormultiple intra modes except ALWIP, such as normal intra mode, or MRL, orISP.

In the following discussion, SatShift(x, n) is defined as

${SatShif{t\left( {x,n} \right)}} = \left\{ \begin{matrix}{\left( {x + {{offsset}0}} \right) ⪢ n} & {{{if}\mspace{14mu} x} \geq 0} \\{- \left( {\left( {{- x} + {{offset}1}} \right) ⪢ n} \right)} & {{{if}\mspace{14mu} x} < 0}\end{matrix} \right.$

Shift(x, n) is defined as Shift(x, n)=(x+offset0)>>n.

In one example, offset0 and/or offset1 are set to (1<<n)>>1 or(1<<(n−1)). In another example, offset0 and/or offset1 are set to 0.

In another example, offset0=offset1=((1<<n)>>1)−1 or ((1<<(n−1)))−1.

Clip3(min, max, x) is defined as

${Clip3\left( {{Min},{Max},x} \right)} = \left\{ \begin{matrix}{{Min}\ } & {{{if}\mspace{14mu} x} < {Min}} \\{{Max}\ } & {{{if}\mspace{14mu} x} > {Max}} \\{x\ } & {Otherwise}\end{matrix} \right.$

MPM List Construction for ALWIP

-   -   1. It is proposed that the whole or partial of the MPM list for        ALWIP may be constructed according to the whole or partial        procedure to construct the MPM list for non-ALWIP intra mode        (such as normal intra mode, MRL, or ISP).        -   a. In one example, the size of the MPM list for ALWIP may be            the same as that of the MPM list for non-ALWIP intra mode.            -   i. For example, the size of MPM list is 6 for both ALWIP                and non-ALWIP intra modes.        -   b. In one example, the MPM list for ALWIP may be derived            from the MPM list for non-ALWIP intra mode.            -   i. In one example, the MPM list for non-ALWIP intra mode                may be firstly constructed. Afterwards, partial or all                of them may be converted to the MPMs which may be                further added to the MPM list for ALWIP coded blocks.                -   1) Alternatively, furthermore, when adding a                    converted MPM to the MPM list for ALWIP coded                    blocks, pruning may be applied.                -   2) Default modes may be added to the MPM list for                    ALWIP coded blocks.                -    a. In one example, default modes may be added                    before those converted from the MPM list of                    non-ALWIP intra mode.                -    b. Alternatively, default modes may be added after                    those converted from the MPM list of non-ALWIP intra                    mode.                -    c. Alternatively, default modes may be added in an                    interleaved way with those converted from the MPM                    list of non-ALWIP intra mode.                -    d. In one example, the default modes may be fixed                    to be the same for all kinds of blocks.                -    e. Alternatively, the default modes may be                    determined according to coded information, such as                    availability of neighboring blocks, mode information                    of neighboring blocks, block dimension.            -   ii. In one example, one intra-prediction mode in the MPM                list for non-ALWIP intra mode may be converted to its                corresponding ALWIP intra-prediction mode, when it is                put into the MPM list for ALWIP.                -   1) Alternatively, all the intra-prediction modes in                    the MPM list for non-ALWIP intra modes may be                    converted to corresponding ALWIP intra-prediction                    modes before being used to construct the MPM list                    for ALWIP.                -   2) Alternatively, all the candidate intra-prediction                    modes (may include the intra-prediction modes from                    neighboring blocks and default intra-prediction                    modes such as Planar and DC) may be converted to                    corresponding ALWIP intra-prediction modes before                    being used to construct the MPM list for non-ALWIP                    intra modes, if the MPM list for non-ALWIP intra                    modes may be further used to derive the MPM list for                    ALWIP.                -   3) In one example, two converted ALWIP                    intra-prediction modes may be compared.                -    a. In one example, if they are the same, only one                    of them may be put into the MPM list for ALWIP.                -    b. In one example, if they are the same, only one                    of them may be put into the MPM list for non-ALWIP                    intra modes.            -   iii. In one example, K out of S intra-prediction modes                in the MPM list for non-ALWIP intra modes may be picked                as the MPM list for ALWIP mode. E.g., K is equal to 3                and S is equal to 6.                -   1) In one example, the first K intra-prediction                    modes in the MPM list for non-ALWIP intra modes may                    be picked as the MPM list for ALWIP mode.    -   2. It is proposed that the one or multiple neighboring blocks        used to derive the MPM list for ALWIP may also be used to used        derive the MPM list for non-ALWIP intra modes (such as normal        intra mode, MRL, or ISP).        -   a. In one example, the neighboring block left to the current            block used to derive the MPM list for ALWIP should be the            same as that used to derive the MPM list for non-ALWIP intra            modes.            -   i. Suppose the top-left corner of the current block is                (xCb, yCb), the width and height of the current block                are W and H, then in one example, the left neighboring                block used to derive the MPM list for both ALWIP and                non-ALWIP intra modes may cover the position (xCb-1,                yCb). In an alternative example, the left neighboring                block used to derive the MPM list for both ALWIP and                non-ALWIP intra modes may cover the position (xCb-1,                yCb+H−1).            -   ii. For example, the left neighboring block and above                neighboring block used in the unified MPM list                construction is A2 and B2 as shown in FIG. 10.        -   b. In one example, the neighboring block above to the            current block used to derive the MPM list for ALWIP should            be the same as that used to derive the MPM list for            non-ALWIP intra modes.            -   i. Suppose the top-left corner of the current block is                (xCb, yCb), the width and height of the current block                are W and H, then in one example, the above neighboring                block used to derive the MPM list for both ALWIP and                non-ALWIP intra modes may cover the position (xCb,                yCb−1). In an alternative example, the above neighboring                block used to derive the MPM list for both ALWIP and                non-ALWIP intra modes may cover the position (xCb+W−1,                yCb−1).            -   ii. For example, the left neighboring block and above                neighboring block used in the unified MPM list                construction is A1 and B1 as shown in FIG. 10.    -   3. It is proposed that the MPM list for ALWIP may be constructed        in different ways according to the width and/or height of the        current block.        -   a. In one example, different neighboring blocks may be            accessed for different block dimensions.    -   4. It is proposed that the MPM list for ALWIP and the MPM list        for non-ALWIP intra modes may be constructed with the same        procedure but with different parameters.        -   a. In one example, K out of S intra-prediction modes in the            MPM list construction procedure of non-ALWIP intra modes may            be derived for the MPM list used in ALWIP mode. E.g., K is            equal to 3 and S is equal to 6.            -   i. In one example, the first K intra-prediction modes in                the MPM list construction procedure may be derived for                the MPM list used in ALWIP mode.        -   b. In one example, the first mode in the MPM list may be            different.            -   i. For example, the first mode in the MPM list for                non-ALWIP intra modes may be Planar, but it may be a                Mode X0 in the MPM list for ALWIP.                -   1) In one example, X0 may be the ALWIP                    intra-prediction mode converted from Planar.        -   c. In one example, stuffing modes in the MPM list may be            different.            -   i. For example, the first three stuffing modes in the                MPM list for non-ALWIP intra modes may be DC, Vertical                and Horizontal, but they may be Mode X1, X2, X3 in the                MPM list for ALWIP.                -   1) In one example, X1, X2, X3 may be different for                    different sizeId.            -   ii. In one example, the number of stuffing mode may be                different.        -   d. In one example, neighboring modes in the MPM list may be            different.            -   i. For example, the normal intra-prediction modes of                neighboring blocks are used to construct the MPM list                for non-ALWIP intra modes. And they are converted to                ALWIP intra-prediction modes to construct the MPM list                for ALWIP mode.        -   e. In one example, the shifted modes in the MPM list may be            different.            -   i. For example, X+K0 where X is a normal                intra-prediction mode and K0 is an integer may be put                into the MPM list for non-ALWIP intra modes. And Y+K1                where Y is an ALWIP intra-prediction mode and K1 is an                integer may be put into the MPM list for ALWIP, where K0                may be different from K1.                -   1) In one example, K1 may depend on the width and                    height.    -   5. It is proposed that a neighboring block is treated as        unavailable if it is coded with ALWIP when constructing the MPM        list for the current block with non-ALWIP intra modes.        -   a. Alternatively, a neighboring block is treated as being            coded with a predefined intra-prediction mode (such as            Planar) if it is coded with ALWIP when constructing the MPM            list for the current block with non-ALWIP intra modes.    -   6. It is proposed that a neighboring block is treated as        unavailable if it is coded with non-ALWIP intra modes when        constructing the MPM list for the current block with ALWIP mode.        -   a. Alternatively, a neighboring block is treated as being            coded with a predefined ALWIP intra-prediction mode X if it            is coded with non-ALWIP intra modes when constructing the            MPM list for the current block with ALWIP mode.            -   i. In one example, X may depend on the block dimensions,                such as width and/or height.    -   7. It is proposed to remove the storage of ALWIP flag from line        buffer.        -   a. In one example, when the 2^(nd) block to be accessed is            located in a different LCU/CTU row/region compared to the            current block, the conditional check of whether the 2^(nd)            block is coded with ALWIP is skipped.        -   b. In one example, when the 2^(nd) block to be accessed is            located in a different LCU/CTU row/region compared to the            current block, the 2^(nd) block is treated in the same way            as non-ALWIP mode, such as treated as normal intra coded            block.    -   8. When encoding the ALWIP flag, no more than K (K>=0) contexts        may be used.        -   a. In one example, K=1.    -   9. It is proposed to store the converted intra prediction mode        of ALWIP coded blocks instead of directly storing the mode index        associated with the ALWIP mode.        -   a. In one example, the decoded mode index associated with            one ALWIP coded block is mapped to the normal intra mode,            such as according to map_alwip_to_angular as described in            Section 2.5.7.        -   b. Alternatively, furthermore, the storage of ALWIP flag is            totally removed.        -   c. Alternatively, furthermore, the storage of ALWIP mode is            totally removed.        -   d. Alternatively, furthermore, condition check of whether            one neighboring/current block is coded with ALWIP flag may            be skipped.        -   e. Alternatively, furthermore, the conversion of modes            assigned for ALWIP coded blocks and normal intra predictions            associated with one accessed block may be skipped.

ALWIP on Different Color Components

-   -   10. It is proposed that an inferred chroma intra mode (e.g., DM        mode) might be always applied if the corresponding luma block is        coded with ALWIP mode.        -   a. In one example, chroma intra mode is inferred to be DM            mode without signaling if the corresponding luma block is            coded with ALWIP mode.        -   b. In one example, the corresponding luma block may be the            one covering the corresponding sample of a chroma sample            located at a given position (e.g., top-left of current            chroma block, center of current chroma block).        -   c. In one example, the DM mode may be derived according to            the intra prediction mode of the corresponding luma block,            such as via mapping the (ALWIP) mode to one of the normal            intra mode.    -   11. When the corresponding luma block of the chroma blocks is        coded with ALWIP mode, several DM modes may be derived.    -   12. It is proposed that a special mode is assigned to the chroma        blocks if one corresponding luma block is coded with ALWIP mode.        -   a. In one example, the special mode is defined to be a given            normal intra prediction mode regardless the intra prediction            mode associated with the ALWIP coded blocks.        -   b. In one example, different ways of intra prediction may be            assigned to this special mode.    -   13. It is proposed that ALWIP may also be applied to chroma        components.        -   a. In one example, the matrix and/or bias vector may be            different for different color components.        -   b. In one example, the matrix and/or bias vector may be            predefined jointly for Cb and Cr.            -   i. In one example, Cb and Cr component may be                concatenated.            -   ii. In one example, Cb and Cr component may be                interleaved.        -   c. In one example, the chroma component may share the same            ALWIP intra-prediction mode as the corresponding luma block.            -   i. In one example, the same ALWIP intra-prediction mode                is applied on the chroma component if the corresponding                luma block applies the ALWIP mode and the chroma block                is coded with DM mode.            -   ii. In one example, the same ALWIP intra-prediction mode                is applied on the chroma component and the linear                interpolation thereafter can be skipped.            -   iii. In one example, the same ALWIP intra-prediction                mode is applied on the chroma component with a                subsampled matrix and/or bias vector.        -   d. In one example, the number of ALWIP intra-prediction            modes for different component may be different.            -   i. For example, the number of ALWIP intra-prediction                modes for chroma components may be less than that for                luma component for the same block width and height.

Applicability of ALWIP

-   -   14. It is proposed that whether ALWIP can be applied may be        signaled.        -   a. For example, it may be signaled at sequence level (e.g.            in SPS), at picture level (e.g. in PPS or picture header),            at slice level (e.g. in slice header), at tile group level            (e.g. in tile group header), at tile level, at CTU row            level, or at CTU level.        -   b. For example, intra_lwip_flag may not be signaled and            inferred to be 0 if ALWIP cannot be applied.    -   15. It is proposed that whether ALWIP can be applied may depend        on the block width (W) and/or height (H).        -   c. For example, ALWIP may not be applied if W>=T1 (or W>T1)            and H>=T2 (or H>T2). E.g. T1=T2=32;            -   i. For example, ALWIP may not be applied if W<=T1 (or                W<T1) and H<=T2 (or H<T2). E.g. T1=T2=32;        -   d. For example, ALWIP may not be applied if W>=T1 (or W>T1)            or H>=T2 (or H>T2). E.g. T1=T2=32;            -   i. For example, ALWIP may not be applied if W<=T1 (or                W<T1) or H<=T2 (or H<T2). E.g. T1=T2=32;        -   e. For example, ALWIP may not be applied if W+H>=T (or            W*H>T). E.g. T=256;            -   i. For example, ALWIP may not be applied if W+H<=T (or                W+H<T). E.g. T=256;        -   f. For example, ALWIP may not be applied if W*H>=T (or            W*H>T). E.g. T=256;            -   i. For example, ALWIP may not be applied if W*H<=T (or                W*H<T). E.g. T=256;        -   g. For example, intra_lwip_flag may not be signaled and            inferred to be 0 if ALWIP cannot be applied.

Calculation Problems in ALWIP

-   -   16. It is proposed that any shift operation involved in ALWIP        can only left shift or right shift a number by S, where S must        be larger or equal to 0.        -   a. In one example, the right shift operation may be            different when S is equal to 0 or larger than 0.            -   i. In one example, upsBdryX[x] should be calculated as                upsBdryX[x]=(Σ_(i=0) ^(uDwn−1)ref[x*uDwn+i]+(1<<(Log                2(uDwn)−1)))>>Log 2(uDwn) when uDwn>1, and                upsBdryX[x]=Σ_(i=0) ^(uDwn−1)refX[x*uDwn+i] when uDwn is                equal to 1.        -   b. In one example, upsBdryX[x] should be calculated as            upsBdryX[x]=(Σ_(i=0) ^(uDwn−1)refX[x*uDwn+i]+(1<<Log            2(uDwn)>>1))>>Log 2(uDwn)    -   17. It is proposed that the results should be rounded        toward-zero or away-from-zero in the up-sampling process of        ALWIP.        -   a. In one example,

predSamples[xHor+dX][yHor]=((upHor−dX)*predSamples[xHor][yHor]+dX*predSamples[xHor+upHor][yHor]+offsetHor)/upHor  (8-X39)

-   -   -   and

predSamples[xVer][yVer+dY]=((upVer−dY)*predSamples[xVer][yVer]+dY*predSamples[xVer][yVer+upVer]+offsetVer)/upVer  (8-X40)

-   -   -   where offsetHor and offsetVer are integers. For example,            offsetHor=upHor/2 and offsetVer=upVer/2.            Interaction with Other Coding Tools

    -   18. It is proposed that ALWIP may be used for a CIIP-coded        block.        -   a. In one example, in a CIIP-coded block, it may be            explicitly signaled whether an ALWIP intra-prediction mode            or a normal intra prediction mode such as Planar is used to            generate the intra prediction signal.        -   b. In one example, it may be implicitly inferred whether an            ALWIP intra-prediction mode or a normal intra prediction            mode such as Planar may be used to generate the intra            prediction signal.            -   i. In one example, ALWIP intra-prediction mode may never                be used in a CIIP coded block.                -   1) Alternatively, normal intra prediction may never                    be used in a CIIP coded block.            -   ii. In one example, it may be inferred from information                of neighboring blocks whether an ALWIP intra-prediction                mode or a normal intra prediction mode such as Planar is                used to generate the intra prediction signal.

    -   19. It is proposed that the whole or partial of the procedure        used to down-sample the neighboring luma samples in the CCLM        mode may be used to down-sample the neighboring samples in the        ALWIP mode.        -   a. Alternatively, the whole or partial of the procedure used            to down-sample the neighboring luma samples in the ALWIP            mode may be used to down-sample the neighboring samples in            the CCLM mode.        -   b. The down-sampling procedure may be invoked with different            parameters/arguments when it is used in the CCLM process and            ALWIP process.        -   c. In one example, the down-sampling method (such as            selection of neighboring luma locations, down-sampling            filters) in the CCLM process may be utilized in the ALWIP            process.        -   d. The procedure used to down-sample the neighboring luma            samples at least include the selection of down-sampled            positions, the down-sampling filters, the rounding and            clipping operations.

    -   20. It is proposed that a block coded with ALWIP mode cannot        apply RST or/and secondary transform or/and rotation transform        or/and Non-Separable Secondary Transform (NSST).        -   a. In one example, whether such constraint may be applied or            not may depend on the dimension information of the block,            e.g., same as conditions described in (15).        -   b. Alternatively, ALWIP mode may be disallowed when RST            or/and secondary transform or/and rotation transform or/and            NSST is applied.        -   c. Alternatively, a block coded with ALWIP mode may apply            RST or/and secondary transform or/and rotation transform            or/and Non-Separable Secondary Transform (NSST).            -   i. In one example, the selection of transform matrix may                depend the ALWIP intra-prediction mode.            -   ii. In one example, the selection of transform matrix                may depend the normal intra-prediction mode which is                converted from the ALWIP intra-prediction mode.            -   iii. In one example, the selection of transform matrix                may depend the classification on the normal                intra-prediction mode which is converted from the ALWIP                intra-prediction mode.

    -   21. It is proposed that a block coded with ALWIP mode cannot        apply Block-based DPCM (BDPCM) or Residue RDPCM.        -   a. Alternatively, ALWIP mode may be disallowed when BDPCM or            RDPCM is applied.

    -   22. It is proposed that a block coded with ALWIP mode may only        use DCT-II as the transform.        -   a. In one example, the signalling of transform matrix            indices is always skipped.        -   b. Alternatively, it is proposed that the transform used for            a block coded with ALWIP mode may be implicitly derived            instead of explicitly signaled. For example, the transform            may be selected following the way proposed in JVET-M0303.        -   c. Alternatively, it is proposed that a block coded with            ALWIP mode may only use transform skip.            -   i. Alternatively, furthermore, when ALWIP is used, the                signalling of indication of usage of transform skip is                skipped.        -   d. In one example, ALWIP mode information (such as            enabled/disabled, prediction mode index) may be            conditionally signalled after indications of transform            matrix.            -   i. In one example, for a given transform matrix (such as                transform skip or DCT-II), the indications of ALWIP mode                information may be signalled.            -   ii. Alternatively, furthermore, the indications of ALWIP                mode information may be skipped for some pre-defined                transform matrices.

    -   23. It is proposed that a block coded with ALWIP mode is        regarded to be coded with a normal intra-prediction converted        from the ALWIP intra-prediction mode when the selected transform        is mode-dependent.

    -   24. ALWIP mode may not use transform skip.        -   a. For example, there is no need to further signal the            indication of usage of transform skip in this case.        -   b. Alternatively, ALWIP mode may be disallowed when            transform skip is applied.            -   i. For example, there is no need to signal ALWIP mode                information when transform skip is applied in this case.

    -   25. In the filtering process, such as deblocking filter, sample        adaptive offset (SAO), adaptive loop filter (ALF), how to select        the filters and/or whether to filter samples may be determined        by the usage of ALWIP.

    -   26. Unfiltered neighboring samples may be used in ALWIP mode.        -   a. Alternatively, filtered neighboring samples may be used            in ALWIP mode.        -   b. In one example, filtered neighboring samples may be used            for down sampling and unfiltered neighboring samples may be            used for up sampling.        -   c. In one example, unfiltered neighboring samples may be            used for down sampling and filtered neighboring samples may            be used for up sampling.        -   d. In one example, filtered left neighboring samples may be            used in up sampling and unfiltered above neighboring samples            may be used in up sampling.        -   e. In one example, unfiltered left neighboring samples may            be used in up sampling and filtered above neighboring            samples may be used in up sampling.        -   f. In one example, whether filter or unfiltered neighboring            samples is used may depend on the ALWIP mode.            -   i. In one example, ALWIP mode may be converted to                traditional intra prediction mode, and whether filtered                or unfiltered neighboring samples is used may depend on                the converted traditional intra prediction mode. For                example, such decision is same as traditional intra                prediction modes.            -   ii. Alternatively, whether filter or unfiltered                neighboring samples is used for ALWIP mode may be                signaled.        -   g. In one example, the filtered samples may be generated            same as traditional intra prediction modes.

    -   27. Which matrices or/and offset vectors are used may depend on        reshaping (a.k.a. LMCS, luma mapping with chroma scaling)        information.        -   a. In one example, different matrices or/and offset vectors            may be used when reshaping is on and off.        -   b. In one example, different matrices or/and offset vectors            may be used for different reshaping parameters.        -   c. In one example, ALWIP may be always performed in original            domain.            -   i. For example, neighboring sample are mapped to the                original domain (if reshaping is applied) before used in                ALWIP.

    -   28. ALWIP may be disabled when reshaping is applied.        -   a. Alternatively, reshaping may be disabled when ALWIP is            enabled.        -   b. In one example, ALWIP may be disabled for HDR (high            dynamic range) content when reshaping is applied.

    -   29. The matrices used in ALWIP may depend on sample bit-depth.        -   a. Alternatively, furthermore, the offset values used in            ALWIP may depend on sample bit-depth.        -   b. Alternatively, the matrix parameters and offset values            can be stored in M-bit precision for N-bit samples (M<=N),            e.g., the matrix parameters and offset values can be stored            in 8-bit precision for a 10-bit sample.        -   c. The sample bit-depth may be the bit-depth of input array            for a color component such as luma.        -   d. The sample bit-depth may be the bit-depth of internal            array/reconstructed sample for a color component, such as            luma.

    -   30. The matrix parameters and/or offset values for a specified        block size may be derived from the matrix parameters and/or        offset values for other block sizes.

    -   31. In one example, the 16×8 matrix of 8×8 block can be derived        from the 16×4 matrix of 4×4 block.

    -   32. It is proposed that the prediction generated by ALWIP may be        treated as an intermedium signal which will be processed to        obtain the prediction signal to be further used.        -   a. In one example, Position Dependent Intra Prediction            Combination (PDPC) may be applied on the prediction            generated by ALWIP to generate the prediction signal to be            further used.            -   i. In one example, PDPC is done on an ALWIP coded block                in the same way as the block is coded with a specific                normal intra-prediction mode, such as Planar or DC.            -   ii. In one example, PDPC is done on an ALWIP coded block                in the same way as the block coded with a normal                intra-prediction mode which is converted from the ALWIP                intra-prediction mode.            -   iii. In one example, PDPC is applied on an ALWIP coded                block conditionally.                -   1) For example, PDPC is applied on an ALWIP coded                    block only when PDPC is applied on the normal                    intra-prediction mode which is converted from the                    ALWIP intra-prediction mode.        -   b. In one example, the boundary samples prediction generated            by ALWIP may be filtered with neighbouring samples to            generate the prediction signal to be further used.            -   i. In one example, filtering on boundary samples is done                on an ALWIP coded block in the same way as the block is                coded with a specific normal intra-prediction mode, such                as Planar or DC.            -   ii. In one example, filtering on boundary samples is                done on an ALWIP coded block in the same way as the                block coded with a normal intra-prediction mode which is                converted from the ALWIP intra-prediction mode.            -   iii. In one example, filtering on boundary samples is                applied on an ALWIP coded block conditionally.                -   1) For example, filtering on boundary samples is                    applied on an ALWIP coded block only when filtering                    on boundary samples is applied on the normal                    intra-prediction mode which is converted from the                    ALWIP intra-prediction mode.

    -   33. It is proposed that interpolation filters other than        bilinear interpolation filter may be used in the up-sampling        process of ALWIP.        -   a. In one example, 4-tap interpolation filters may be used            in the up-sampling process of ALWIP.            -   i. For example, the 4-tap interpolation filters in VVC                used to do the motion compensation for chroma components                may be used in the up-sampling process of ALWIP.            -   ii. For example, the 4-tap interpolation filters in VVC                used to do angular intra-prediction may be used in the                up-sampling process of ALWIP.            -   iii. For example, the 8-tap interpolation filters in VVC                used to do the motion compensation for luma component                may be used in the up-sampling process of ALWIP.

    -   34. Samples within a block coded in ALWIP mode may be predicted        in different ways.        -   a. In one example, for a W*H block, prediction of a sW*sH            sub-block within it may be generated by applying sW*sH ALWIP            to it.            -   i. In one example, for a W*H block, prediction of its                top-left W/2*H/2 block may be generated by applying                W/2*H/2 ALWIP to it.            -   ii. In one example, for a W*H block, prediction of its                left W/2*H block may be generated by applying W/2*H                ALWIP to it.            -   iii. In one example, for a W*H block, prediction of its                top W*H/2 block may be generated by applying W*H/2 ALWIP                to it.            -   iv. In one example, the sW*sH sub-block may have                available left or/and above neighboring samples.        -   b. In one example, how to decide the position of the            sub-block may depend on dimension of the block.            -   i. For example, when W>=H, prediction of its left W/2*H                block may be generated by applying W/2*H ALWIP to it.            -   ii. For example, when H>=W, prediction of its top W*H/2                block may be generated by applying W*H/2 ALWIP to it.            -   iii. For example, when W is equal to H, prediction of                its top-left W/2*H/2 block may be generated by applying                W/2*H/2 ALWIP to it.        -   c. In one example, furthermore, prediction of the remaining            samples (e.g., samples do not belong to the sW*sH sub-block)            may be generated by applying the W*H ALWIP.            -   i. Alternatively, prediction of the remaining samples                may be generated by applying conventional intra                prediction (e.g., using the converted intra prediction                mode as the intra mode).            -   ii. Furthermore, calculation may be skipped for samples                in the sW*sH sub-block.

    -   35. Samples within a block coded in ALWIP mode may be predicted        in sub-block (e.g., with size sW*sH) level.        -   a. In one example, sW*sH ALWIP may be applied to each            sub-block using neighboring reconstructed samples (e.g., for            boundary sub-blocks) or/and neighboring predicted samples            (e.g., for inner sub-blocks).        -   b. In one example, sub-blocks may be predicted in            raster-scan order.        -   c. In one example, sub-blocks may be predicted in zigzag            order.        -   d. In one example, width (height) of sub-blocks may be no            larger than sWMax (sHMax).        -   e. In one example, when a block with either width or height            or both width and height are both larger than (or equal to)            a threshold L, the block may be split into multiple            sub-blocks.        -   f. The threshold L may be pre-defined or signaled in            SPS/PPS/picture/slice/tile group/tile level.            -   i. Alternatively, the thresholds may depend on certain                coded information, such as block size, picture type,                temporal layer index, etc. al.

    -   36. It is proposed that the neighbouring samples (adjacent or        non-adjacent) are filtered before being used in ALWIP.        -   a. Alternatively, neighbouring samples are not filtered            before being used in ALWIP.        -   b. Alternatively, neighbouring samples are conditionally            filtered before being used in ALWIP.            -   i. For example, neighbouring samples are filtered before                being used in ALWIP only when the ALWIP intra-prediction                mode is equal to one or some specific values.

    -   37. It is proposed that when coding the ALWIP flag, the method        to derive the context for the ALWIP flag in arithmetic coding is        the same for all dimensions of the current block.        -   a. In one example, the method to derive the context for the            ALWIP flag in arithmetic coding is the same when (Abs(Log            2(cbWidth)−Log 2(cbHeight)) is larger than 1 or not, where            CbWidth and CbHeight are the width and height of the current            block, respectively.        -   b. In one example, the derivation of the context for the            ALWIP flag in arithmetic coding only depends on neighboring            blocks' ALWIP information and/or the availability of the            neighbouring blocks.            -   i. In one example, multiple neighboring blocks ALWIP                information (e.g., intra_lwip_flag) and/or the                availability of the neighbouring blocks are directly                used. For example, the left and above neighbouring                blocks' ALWIP flags and/or the availability of the left                and neighbouring blocks are used to derive the context                for the ALWIP flag in arithmetic coding. An example is                shown in Table 5. Alternatively, furthermore, the                context index offset ctxInc=(condL && availableL)+(condA                && availableA)+ctxSetIdx*3.

TABLE 5 Specification of ctxInc using left and above syntax elementsSyntax element condL condA ctxSetIdx intra_lwip_flag intra_lwip_flagintra_lwip_flag 0 [ x0 ][ y0 ] [ xNbL ][ yNbL ] [ xNbA ][ yNbA ]

-   -   -   -   ii. In one example, one of the neighboring block's ALWIP                information (e.g., intra_lwip_flag) is used to derive                the context for the ALWIP flag in arithmetic coding, and                the neighbouring block may be the left neighbouring                block. An example is shown in Table 6. Alternatively,                furthermore, the context index offset ctxInc=(condL &&                availableL)+ctxSetIdx*3.

TABLE 6 Specification of ctxInc using left and above syntax elementsSyntax element condL condA ctxSetIdx intra_lwip_flag intra_lwip_flag 0 [x0 ][ y0 ] [ xNbL ][ yNbL ]

-   -   -   -   iii. In one example, one of the neighboring block's                ALWIP flag information (e.g., intra_lwip_flag) is used                to derive the context for the ALWIP flag in arithmetic                coding, and the neighbouring block may be the above                neighbouring block. An example is shown in Table 7.                Alternatively, furthermore, the context index offset                ctxInc=(condA && availableA)+ctxSetIdx*3.

TABLE 7 Specification of ctxInc using left and above syntax elementsSyntax element condL condA ctxSetIdx intra_lwip_flag intra_lwip_flag 0 [x0 ][ y0 ] [ xNbA ][ yNbA ]

-   -   -   c. In one example, one fixed context is used for coding the            ALWIP flag in arithmetic coding.        -   d. In one example, ALWIP flag is bypass coded in arithmetic            coding.        -   e. Alternatively, K contexts may be used for coding ALWIP            flag in arithmetic coding. The context to be used may depend            on dimension (e.g. width denoted as W and height denoted            as H) of the block.            -   i. In one example, K is equal to 2. When W>N*H or H>N*W                (e.g., N=2), the first context is used, otherwise, the                second context is used.

    -   38. It is proposed that N (N>=0) contexts may be used to code        the ALWIP flag (e.g., intra_lwip_flag) in arithmetic coding.        -   a. In one example, N is equal to three. ALWIP flag and/or            availability of two neighboring or/and non-adjacent blocks            may be used for deriving the used context for the ALWIP flag            in arithmetic coding.            -   i. In one example, the two neighboring blocks may                include the above (e.g., B1 in FIG. 10) block and the                left (e.g., A1 in FIG. 10) block.            -   ii. In one example, the two neighboring blocks may                include the above block and the below-left (e.g., A2 in                FIG. 10) block.            -   iii. In one example, the two neighboring blocks may                include the above block and the above-right (e.g., B2 in                FIG. 10) block.            -   iv. In one example, the two neighboring blocks may                include the above-right (e.g., B2 in FIG. 10) block and                the left (e.g., A1 in FIG. 10) block.            -   v. In one example, the two neighboring blocks may                include the above-right (e.g., B2 in FIG. 10) block and                the below-left (e.g., A2 in FIG. 10) block.            -   vi. In one example, the two neighboring blocks may                include the left block (e.g., A1 in FIG. 10) and the                below-left (e.g., A2 in FIG. 10) block.            -   vii. In one example, the neighboring block may be                defined differently from FIG. 10. an example is                described in FIG. 16. The two neighboring blocks may                include any two of the {above-right, above, above-left,                left, below-left} blocks. E.g., The two neighboring                blocks may include any two of the blocks in {B0, B1, B2,                A0, A1}.        -   b. In one example, N is equal to two. ALWIP flag and/or            availability of one neighboring or/and non-adjacent block            may be used for deriving the used context for the ALWIP flag            in arithmetic coding.            -   i. In one example, the neighboring block may be anyone                of the {above-right, above, above-left, left,                below-left}. An example of the neighboring block is                described in FIG. 10.            -   ii. In one example, the neighboring block may be anyone                of the {above-right, above, above-left, left,                below-left} block. An example of the neighboring block                is described in FIG. 16.        -   c. In one example, one fixed context may be used for coding            ALWIP flag in arithmetic coding.        -   d. In one example, ALWIP flag may be bypass coded in            arithmetic coding. FIG. 16 shows an example of neighboring            blocks.

    -   39. It is proposed that the reduced boundary samples may be        generated without calculating the up-sampling boundary samples.        -   a. In one example, the reference samples located at the            upsampling boundary sample positions are directly used for            the prediction upsampling process.            -   i. In one example, the upsampling boundary samples may                not be computed by averaging multiple adjacent reference                samples.        -   b. In one example, the reduced boundary samples may be            directly calculated from reference samples and the            downscaling factor.            -   i. In one example, the downscaling factor may be                computed by the transform block size and the downsampled                boundary size.

    -   40. It is proposed that the reduced boundary samples used for        matrix multiplication may be generated in one stage.        -   a. In one example, they may be generated directly from            original reconstructed neighboring samples in one stage            (noted that VVC WD5 uses a two-stage down-sampling to            generate ALWIP reduced boundary samples, as described in            section 2.2.1.5.4.4), wherein the original reconstructed            neighboring samples may be decoded neighboring samples            without further processing. E.g., the original reconstructed            neighboring samples may be used to generate the angular            inter-prediction samples.        -   b. In one example, the reduced boundary samples may be            generated from original reconstructed samples located at the            top neighboring rows and/or the left neighboring columns of            the current block.            -   i. For example, suppose N reduced boundary samples need                to be generated from M original reconstructed samples                neighboring (in a given order) the current block, then                each K successive original reconstructed neighboring                samples may be used to get one output reduced boundary                sample.                -   1) In one example, K=M/N.                -    a. Alternatively, K=(M+N/2)/N.                -   2) In one example, one output reduced boundary                    sample may be derived as the average of the K                    successive original reconstructed neighboring                    samples.                -   3) In one example, one output reduced boundary                    sample may be derived as the weighted average of the                    K successive original reconstructed neighboring                    samples.        -   c. In one example, the left reduced boundary samples may be            generated from original reconstructed samples located at the            left neighboring columns of the current block, while the top            reduced samples may be generated from original reconstructed            samples located at the top neighboring rows of the current            block.            -   i. For examples, as depicted in FIG. 17, four reduced                boundary samples on the left boundary and top boundary,                denoted as boundary_(left) and boundary_(top),                respectively, are generated by left/top original                neighboring reconstructed samples (marked as gray grids                neighboring to the 16×16 block in the figure) of the                current 16×16 ALWIP block.        -   d. How to generate reduced boundary samples may depend on            the block dimensions/coded information (e.g., intra            prediction mode, transform types, etc.).        -   e. In one example, the above-mentioned method may be applied            to all sizes of ALWIP blocks which requires generating            reduced boundary samples (e.g., from 4×4 ALWIP blocks to            64×64 ALWIP blocks).        -   f. In one example, the generation process for the reduced            boundary samples for the left neighboring columns of the            current block and the top neighboring rows of the current            block may be conducted in different ways.            -   i. For example, for a 8×4 ALWIP block, the number of the                pre-defined reduced boundary samples is 4 on the top and                4 on the left, then the 8 neighboring samples located at                the top row of the 8×4 ALWIP block is used to generate                the 4 reduced boundary samples on the top, while the 4                neighboring samples located at the left column of the                8×4 ALWIP block is directly copied as the 4 reduced                boundary samples on the left.

    -   41. It is proposed to use all or some of original reconstructed        neighboring samples (adjacent or non-adjacent to the current        block) in the up-sampling process to generate the final        prediction block from reduced prediction block.        -   a. In one example, original reconstructed neighboring            samples may be located at the top neighboring rows and/or            the left neighboring columns of the current block. An            example is shown in FIG. 18, wherein a 64×64 final            prediction block is generated by up-sampling from an 8×8            reduced prediction block plus the original reconstructed            neighboring samples of the 64×64 block.            -   i. Alternatively, furthermore, the reduced boundary                samples may be only used for matrix multiplication to                get the reduced prediction block, but not used in the                up-sampling process to generate the final prediction                block. For example, K reduced boundary samples may be                input into the matrix multiplication of ALWIP to produce                a M×N reduced prediction block, but may not be used to                generate the final prediction block in the up-sampling                process. E.g. K=8 and M×N is 8×8.        -   b. In one example, selected original reconstructed            neighboring samples may be used in the up-sampling process            to generate the final prediction block from a reduced            prediction block.            -   i. For example, all original reconstructed neighboring                samples left to the current block may be selected.            -   ii. For example, all original reconstructed neighboring                samples above to the current block may be selected.            -   iii. For example, K of each M successive original                reconstructed neighboring samples left to the current                block may be selected. e.g. K=1, M=2/4/8.                -   1) For example, the latter K original reconstructed                    neighboring samples of each M successive neighbors                    may be selected.                -   2) For example, the first K original reconstructed                    neighboring samples of each M successive neighbors                    may be selected.            -   iv. For example, K of each M successive original                reconstructed neighboring samples above to the current                block may be selected. e.g. K=1, M=2/4/8.                -   1) For example, the latter K original reconstructed                    neighboring samples of each M successive neighbors                    may be selected.                -   2) For example, the first K original reconstructed                    neighboring samples of each M successive neighbors                    may be selected.            -   v. For example, the selection may depend on the block                width and height. Assume blkW and blkH denote the width                and height of an ALWIP block, respectively. And (blkX,                blkY) represents the top-left position of the block.                -   1) For example, if blkW is larger than or equal to                    blkH, then all original reconstructed neighboring                    samples left to the current block may be selected,                    and/or the number of the selected original                    reconstructed neighboring samples above to the                    current block, denoted by M, may depend on the blkW.                -    a. In one example, the k^(th) selected samples                    above to the current block may be at position                    (blkX+(k+1)*blkW/M−1, blkY−1), where k is from 0 to                    M−1.                -    b. For example, if blkW<=8, then M=4.                -    c. For example, if blkW>8, then M=8.                -    d. Alternatively, no matter the relationship                    between blkW and blkH, all original reconstructed                    neighboring samples left to the current block may be                    selected, and/or M original reconstructed                    neighboring samples above to the current block may                    be selected, where in M is decided by above rules.                -   2) For example, if blkW is less than blkH, then all                    original reconstructed neighboring samples above to                    the current block may be selected, and/or the number                    of the selected original reconstructed neighboring                    samples left to the current block, denoted by M, may                    depend on the blkH.                -    a. In one example, the k^(th) selected samples left                    to the current block may be at position (blkX−1,                    blkY+(k+1)*blkH/M−1), where k is from 0 to M−1.                -    b. For example, if blkH<=8, then M=4.                -    c. For example, if blkH>8, then M=8.                -    d. Alternatively, no matter the relationship                    between blkW and blkH, all original reconstructed                    neighboring samples above to the current block may                    be selected, and/or M original reconstructed                    neighboring samples left to the current block may be                    selected, where in M is decided by above rules.        -   c. In one example, the neighboring samples used for ALWIP            up-sampling may be further modified (e.g., filtered, where            the filter may be a N-tap filter, such as N=2 or 3) before            being used to generate the final prediction block.            -   i. In one example, the neighboring samples filtering                process may be adaptively applied according to the ALWIP                mode.        -   d. How to generate the final prediction block (e.g., linear            interpolation) may depend on the block dimension/coded            information (e.g., intra prediction direction, transform            types, etc.).

    -   42. In one example, the samples may be with different precisions        in different filtering stages in the up-sampling process in        ALWIP. “Samples” may refer to prediction samples or any        intermedium samples before or after the up-sampling process.        -   a. In one example, samples are up-sampled along a first            dimension horizontally in a first filtering stage; then            samples are up-sampled along a second dimension vertically            in a second filtering stage in the up-sampling process in            ALWIP.            -   i. Alternatively, samples are up-sampled along a first                dimension vertically in a first filtering stage; then                samples are up-sampled along a second dimension                horizontally in a second filtering stage in the                up-sampling process in ALWIP.        -   b. In one example, the output up-sampling results without            right-shifting or division in the first filtering stage may            be used as the input samples to the second filtering stage.            -   i. In one example, the output up-sampling filtering                results in the second filtering stage may be                right-shifted by Shift1 or divided by Dem1 to derive the                final up-sampled results.            -   ii. In one example, the output up-sampling filtering                results in the first filtering stage may be                right-shifted by Shift2 or divided by Dem2 to derive the                final up-sampled results.                -   1) In one example, Shift1=2×Shift2; Dem1=Dem2×Dem2.            -   iii. In one example, the samples, which are input to the                second filtering stage but are not the output                up-sampling results in the first filtering stage, may be                left-shifted Shift3 or multiplied by Dem3 before being                input to the second filtering stage.                -   1) In one example, Shift3=Shift1; Dem3=Dem2.        -   c. In one example, the output up-sampling results in the            first filtering stage may be right-shifted by Shift1 or            divided by Dem1 before being used as the input samples to            the second filtering stage.            -   i. In one example, the output up-sampling filtering                results in the second filtering stage may be                right-shifted by Shift2 or divided by Dem2 to derive the                final up-sampled results, where Shift2 may be not equal                to Shift1, e.g. Shift2>Shift1; Dem2 may be not equal to                Dem1, e.g. Dem2>Dem1.            -   ii. In one example, the output up-sampling filtering                results in the first filtering stage may be                right-shifted by Shift3 or divided by Dem3 to derive the                final up-sampled results, where Shift3 may be equal to                Shift1; Dem3 maybe not equal to Dem1.                -   1) In one example, Shift3=Shift1+Shift2.            -   iii. In one example, the samples, which are input to the                second filtering stage but are not the output                up-sampling results in the first filtering stage, may be                left-shifted or multiplied by a factor before being                input to the second filtering stage.        -   d. In one example, the output up-sampling results in the            first filtering stage may be left-shifted by Shift1 or            multiplied by Dem1 before being used as the input samples to            the second filtering stage.            -   i. In one example, the output up-sampling filtering                results in the second filtering stage may be                right-shifted or divided by a factor to derive the final                up-sampled results.            -   ii. In one example, the output up-sampling filtering                results in the first filtering stage may be                right-shifted or divided by a factor to derive the final                up-sampled results.            -   iii. In one example, the samples, which are input to the                second filtering stage but are not the output                up-sampling results in the first filtering stage, may be                left-shifted by Shift2 or multiplied by Dem2 before                being input to the second filtering stage, where Shift2                may be not equal to Shift1, e.g. Shift2>Shift1; Dem1 may                be not equal to Dem2, e.g. Dem2>Dem1.        -   e. In one example, the samples which are input to the first            filtering stage may be left-shifted by Shift1 or multiplied            by Dem1 before being used as the input samples to the first            filtering stage.            -   i. In one example, the output up-sampling filtering                results in the second filtering stage may be                right-shifted or divided by a factor to derive the final                up-sampled results.            -   ii. In one example, the output up-sampling filtering                results in the first filtering stage may be                right-shifted or divided by a factor to derive the final                up-sampled results.            -   iii. In one example, the samples, which are input to the                second filtering stage but are not the output                up-sampling results in the first filtering stage, may be                left-shifted by Shift2 or multiplied by Dem2 before                being input to the second filtering stage, where Shift2                may be not equal to Shift1, e.g. Shift2>Shift1; Dem2 may                be not equal to Dem1, e.g. Dem2>Dem1.

    -   43. It is proposed that up-sampling in ALWIP may be performed in        a fixed order when both vertical up-sampling and horizontal        up-sampling are required.        -   a. In one example, horizontal up-sampling may be performed            firstly, and vertical up-sampling may be performed secondly.        -   b. In one example, vertical up-sampling may be performed            firstly, and horizontal up-sampling may be performed            secondly.

    -   44. In one example, the prediction samples in ALWIP before        up-sampling may be transposed according to the block dimensions.        -   a. In one example, a W*H block may be firstly transposed to            H*W block, then up-sampling may be applied.        -   b. Alternatively, furthermore, after the up-sampling            process, the up-sampled samples may be transposed in a            reversed way.

    -   45. It is proposed that alternative interpolation filters        instead of the bilinear filter may be used for up-sampling in        ALWIP.        -   a. In one example, (4-tap, 6-tap, 8-tap etc.) gaussian            filter may be used.        -   b. In one example, (4-tap, 6-tap, 8-tap etc.) cubic filter            may be used.        -   c. In one example, interpolation filters used in motion            compensation for chroma samples may be used.        -   d. In one example, interpolation filters (6-tap, 8-tap etc.)            used in motion compensation for luma samples may be used.        -   e. Which interpolation filter is used may depend on the            block dimensions.        -   f. Which interpolation filter is used may depend on the            up-sampling ratio.        -   g. Which interpolation filter is used may depend on the            prediction mode of ALWIP.        -   h. Which interpolation filter is used may depend on how many            samples are available for up-sampling.            -   i. For example, when there are 4 available samples                (excluding the neighboring reference samples) in one row                (or column), 4-tap interpolation filter may be used.            -   ii. For example, when there are 8 available samples                (excluding the neighboring reference samples) in one row                (or column), 4-tap or 8-tap interpolation filter may be                used.

5. EMBODIMENTS

Newly added parts are highlighted in bold faced italics and deletedparts are highlighted in underlined italicized text.

5.1 One Example

Three contexts are used for coding ALWIP flag.

TABLE 9-15 Assignment of ctxInc to syntax elements with context codedbins

... terminate na na na na na intra_lwip_flag[ ][ ] (Abs(   Log2(cbWidth)− na na na na na Log2(cbHeight)   )   >   1)   ? 3   :   (   0,1,2(clause   9.5.4.2.2)   ) intra_lwip_mpm_flag[ ][ ] ( 0,1,2 na na na nana (clause 9.5.4.2.2) ) intra_lwip_mpm_flag[ ][ ] 0 na na na na naintra_lwip_mpm_idx[ ][ ] bypass bypass na na na naintra_lwip_mpm_remainder[ ][ ] bypass bypass bypass bypass bypass na

5.2 One Example

One fixed context is used for coding ALWIP flag.

TABLE 9-15 Assignment of ctxInc to syntax elements with context codedbins

 

... terminate na na na na na intra_lwip_flag[ ][ ] (Abs(   Log2(cbWidth)  − na na na na na Log2(cbHeight)   )   >   1)   ? 3   :   (   0,1,2(clause   9.5.4.2.2)   )

 _ 

 _ 

 [ ][ ]

intra_lwip_mpm_flag[ ][ ] 0 na na na na na intra_lwip_mpm_idx[ ][ ]bypass bypass na na na na intra_lwip_mpm_remainder[ ][ ] bypass bypassbypass bypass bypass na

5.3 One Example

Perform the boundary reduction process in one-step.Below embodiments are based on the adoptedJVET-N0220-proposal-test-CE3-4.1_v2.

8.4.4.2.X1 Affine Linear Weighted Intra Sample Prediction 8.4.4.2.X3Specification of the Boundary Reduction Process

Inputs to this process are:

-   -   a variable nTbX specifying the transform block size,    -   reference samples refX[x] with x=0 . . . nTbX−1,    -   a variable boundarySize specifying the downsampled boundary        size,    -   a flag needUpsBdryX specifying whether intermediate boundary        samples are required for upsampling,    -   a variable upsBdrySize specifying the boundary size for        upsampling.        Outputs of this process are the reduced boundary samples redX[x]        with x=0 . . . boundarySize−1 and upsampling boundary samples        upsBdryX[x] with x=0 . . . upsBdrySize−1.        The upsampling boundary samples upsBdryX[x] with x=0 . . .        upsBdrySize−1 are derived as follows:    -   If needUpsBdryX is equal to TRUE and upsBdrySize is less than        nTbX, the following applies:

uDwn=nTbX/upsBdrySize  (8-X30)

upsBdryX[x]=refX[x*uDwn]

upsBdryX[x]=(Σ_(i=0) ^(uDwn−1)refX[x*uDwn+i]+(1<<(Log 2(uDwn)−1)))>>Log2(uDwn)  (8-X31)

-   -   Otherwise (upsBdrySize is equal to nTbX), upsBdryX[x] is set        equal to refX[x].        The reduced boundary samples redX[x] with x=0 . . .        boundarySize−1 are derived as follows:    -   If boundarySize is less than upsBdrySize nTbX, the following        applies:

bDwn=upsBdrySize nTbX/boundarySize  (8-X32)

redX[x]=(Σ_(i=0) ^(bDwn−1)upsBdryX refX[x*bDwn+i]+(1<<(Log2(bDwn)−1)))>>Log 2(bDwn)  (8-X33)

-   -   -   The term upsBdryX in Equation 8-X33 is deleted.

    -   Otherwise (boundarySize is equal to upsBdrySize nTbX), redX[x]        is set equal to upsBdryX[x]refX[x].

5.4 One Example

Derive prediction samples with different precisions in differentfiltering stages in the up-sampling process in ALWIP.Below embodiments are based on the adoptedJVET-N0217-proposal-test-CE3-4.1_v2.8.4.4.2.X4 Specification of the prediction upsampling process

Inputs to this process are:

-   -   a variable predW specifying the input block width,    -   a variable predH specifying the input block height,    -   affine linear weighted samples predLwip[x][y], with x=0 . . .        predW−1, y=0 . . . predH−1,    -   a variable nTbW specifying the transform block width,    -   a variable nTbH specifying the transform block height,    -   a variable upsBdryW specifying the upsampling boundary width,    -   a variable upsBdryH specifying the upsampling boundary height,    -   top upsampling boundary samples upsBdryT[x] with x=0 . . .        upsBdryW−1,    -   left upsampling boundary samples upsBdryL[x] with x=0 . . .        upsBdryH−1.        Outputs of this process are the predicted samples        predSamples[x][y], with x=0 . . . nTbW−1, y=0 . . . nTbH−1.        The sparse predicted samples predSamples[m][n] are derived from        predLwip[x][y], with x=0 . . . predW−1, y=0 . . . predH−1 as        follows:

upHor=nTbW/predW  (8-X34)

upVer=nTbH/predH  (8-X35)

predSamples[(x+1)*upHor−1][(y+1)*upVer−1]=predLwip[x][y]  (8-X36)

The top boundary samples upsBdryT[x] with x=0 . . . upsBdryW−1 areassigned to predSamples[m][−1] as follows:

predSamples[(x+1)*(nTbW/upsBdryW)−1][−1]=upsBdryT[x]  (8-X37)

The left boundary samples upsBdryL[y] with y=0 . . . upsBdryH−1 areassigned to predSamples[−1][n] as follows:

predSamples[−1][(y+1)*(nTbH/upsBdryH)−1]=upsBdryL[y]  (8-X38)

The predicted samples predSamples[x][y], with x=0 . . . nTbW−1, y=0 . .. nTbH−1 are derived as follows:

-   -   If nTbH is greater than nTbW, the following ordered steps apply:    -   1. When upHor is greater than 1, horizontal upsampling for all        sparse positions (xHor, yHor)=(m*upHor−1, n*upVer−1) with m=0 .        . . predW−1, n=1 . . . predH is applied with dX=1 . . . upHor−1        as follows:

predSamples[xHor+dX][yHor]=((upHor−dX)*predSamples[xHor][yHor]+dX*predSamples[xHor+upHor][yHor])/upHor  (8-X39)

-   -   2. Vertical upsampling for all sparse positions (xVer, yVer)=(m,        n*upVer−1) with m=0 . . . nTbW−1, n=0 . . . predH−1 is applied        with dY=1 . . . upVer−1 as follows:        -   If yVer is equal to −1,            predSamples[xVer][yVer]=predSamples[xVer][yVer]<<log            2(upHor)

predSamples[xVer][yVer+dY]=((upVer−dY)*predSamples[xVer][yVer]+dY*predSamples[xVer][yVer+upVer])/upVer+(1<<(log2(upHor)+log 2(upVer)−1)))>>(log 2(upHor)+log 2(upVer))  (8-X40)

-   -   Otherwise, the following ordered steps apply:    -   1. When upVer is greater than 1, vertical upsampling for all        sparse positions (xVer, yVer)=(m*upHor−1, n*upVer−1) with m=1 .        . . predW, n=0 . . . predH−1 is applied with dY=1 . . . upVer−1        as specified in (8-X40) (8-X41).

predSamples[xVer][yVer+dY]=((upVer−dY)*predSamples[xVer][yVer]+dY*predSamples[xVer][yVer+upVer])  (8-X41)

-   -   2. Horizontal upsampling for all sparse positions (xHor,        yHor)=(m*upHor−1, n) with m=0 . . . predW−1, n=0 . . . nTbH−1 is        applied with dX=1 . . . upHor−1 as specified in (8-X39) as        follows.        -   If xHor is equal to −1,            predSamples[xHor][yHor]=predSamples[xHor][yHor]<<log            2(upVer)

predSamples[xHor+dX][yHor]=((upHor−dX)*predSamples[xHor][yHor]+dX*predSamples[xHor+upHor][yHor]+(1<<(log2(upHor)+log 2(upVer)−1)))>>(log 2(upHor)+log 2(upVer))  (8-X42)

5.5 Examples Corresponding to Bullet 40

Suppose the block dimensions are W×H. Samples P(x, y) with x=Sx, Sx+Kx,Sx+2Kx, Sx+3Kx, . . . , y=Sy, Sy+Ky, Sy+2Ky, Sy+3Ky . . . are input tothe up-sampling process to derive the up-sampled samples S(x, y) withx=0,1,2 . . . W−1, y=0, 1, 2, . . . H−1. Kx and Ky are step sizes alongthe horizontal and vertical directions respectively. (Sx, Sy) is thestarting position.Suppose 1-D up-sampling is done horizontally in the first stage and 1-Dup-sampling is done vertically in the second stage.In one example, the output results in the first stage withoutright-shifting may be derived as

S′(Sx+Kx−1,Sy)=F1*P(Sx,Sy)+F2*P(Sx+Kx,Sy).

S′(Sx+Kx−1,Sy+Ky)=F1*P(Sx,Sy+Ky)+F2*P(Sx+Kx,Sy+Ky).

F1, F2 are coefficients for a 2-tap filter and F1+F2=2″.Then an output result in the second stage may be derived as

S′(Sx+Kx−1,Sy+1)=F3*S′(Sx+Kx−1,Sy)+F4*S′(Sx+Kx−1,Sy+Ky).

F3, F4 are coefficients for a 2-tap filter and F3+F4=2^(N).Then the final up-sampled sample value may be derived as:

S(Sx+Kx−1,Sy+1)=Shift(S′(Sx+Kx−1,Sy+1),2N);

S(Sx+Kx−1,Sy)=Shift(S′(Sx+Kx−1,Sy),N);

S(Sx+Kx−1,Sy+Ky)=Shift(S′(Sx+Kx−1,Sy+Ky),N);

5.6 One Example

Derive the reduced boundary samples in one stage and generate thereference buffer for up-sampling.Below embodiments are based on the adoptedJVET-N0217-proposal-test-CE3-4.1_v2.

8.4.4.2.X1 Affine Linear Weighted Intra Sample Prediction 8.4.4.2.X3Specification of the Boundary Reduction Process

. . .The upsampling boundary samples upsBdryX[x] with x=0 . . . upsBdrySize−1are derived as follows:

-   -   If needUpsBdryX is equal to TRUE and upsBdrySize is less than        nTbX, the following applies:

uDwn=nTbX/upsBdrySize  (8-X30)

upsBdryX[x]=(Σ_(i=0) ^(uDwn−1)refX[x*uDwn+i]+(1<<(Log 2(uDwn)−1)))>>Log2(uDwn)  (8-X31)

upsBdryX[x]=refX[(x+1)*uDwn−1]

-   -   Otherwise (upsBdrySize is equal to nTbX), upsBdryX[x] is set        equal to refX[x].        The reduced boundary samples redX[x] with x=0 . . .        boundarySize−1 are derived as follows:    -   If boundarySize is less than upsBdrySize nTbX, the following        applies:

bDwn=upsBdrySize nTbX/boundarySize  (8-X32)

redX[x]=(Σ_(i=0) ^(bDwn−1)upsBdryX refX[x*bDwn+i]+(1<<(Log2(bDwn)−1)))>>Log 2(bDwn)  (8-X33)

-   -   -   The term upsBdryX in Equation 8-X33 is deleted.

    -   Otherwise (boundarySize is equal to upsBdrySize nTbX), redX[x]        is set equal to upsBdryX refX [x].

5.7 One Example

Examples for fixed order up-sampling in ALWIP (a.k.a, matrix-based intraprediction, or MIP) is present here. The text is based on JVET-N1001-v6.5.7.1 First Horizontal Up-Sampling, then Vertical Up-Sampling

8.4.5.2.1 Matrix-Based Intra Sample Prediction

Inputs to this process are:

-   -   a sample location (xTbCmp, yTbCmp) specifying the top-left        sample of the current transform block relative to the top-left        sample of the current picture,    -   a variable predModeIntra specifying the intra prediction mode,    -   a variable nTbW specifying the transform block width,    -   a variable nTbH specifying the transform block height.        Outputs of this process are the predicted samples        predSamples[x][y], with x=0 . . . nTbW−1, y=0 . . . nTbH−1.        Variables numModes, boundarySize, predW, predH and predC are        derived using MipSizeId[xTbCmp][yTbCmp] as specified in Table        8-7.

TABLE 8-7 Specification of number of prediction modes numModes, boundarysize boundarySize, and prediction sizes predW, predH and predC usingMipSizeId MipSizeId numModes boundarySize predW predH predC 0 35 2 4 4 41 19 4 4 4 4 2 11 4 Min( nTbW, Min( nTbH, 8 8 ) 8 )The flag isTransposed is derived as follows:

isTransposed=(predModeIntra>(numModes/2))?TRUE:FALSE  (8-56)

The flags needUpsBdryHor and needUpsBdryVer are derived as follows:

needUpsBdryHor=(nTbW>predW)?TRUE:FALSE  (8-57)

needUpsBdryVer=(nTbH>predH)?TRUE:FALSE  (8-58)

The variables upsBdryW and upsBdryH are derived as follows:

upsBdryW=(nTbH>nTbW)?nTbW:predW  (8-59)

upsBdryH=(nTbH>nTbW)?predH:nTbH  (8-60)

upsBdryW=nTbW  (8-59)

upsBdryH=predH  (8-60)

The variables mipW and mipH are derived as follows:

mipW=isTransposed?predH:predW  (8-61)

mipH=isTransposed?predW: predH  (8-62)

For the generation of the reference samples refT[x] with x=0 . . .nTbW−1 and refL[y] with y=0 . . . nTbH−1, the MIP reference samplederivation process as specified in clause 8.4.5.2.2 is invoked with thesample location (xTbCmp, yTbCmp), the transform block width nTbW, thetransform block height nTbH as inputs, and top and left referencesamples refT[x] with x=0 . . . nTbW−1 and refL[y] with y=0 . . . nTbH−1,respectively, as outputs.For the generation of the boundary samples p[x] with x=0 . . .2*boundarySize−1, the following applies:

-   -   The MIP boundary downsampling process as specified in clause        8.4.5.2.3 is invoked for the top reference samples with the        block size nTbW, the reference samples refT[x] with x=0 . . .        nTbW−1, the boundary size boundarySize, the upsampling boundary        flag needUpsBdryHor, and the upsampling boundary size upsBdryW        as inputs, and reduced boundary samples redT[x] with x=0 . . .        boundarySize−1 and upsampling boundary samples upsBdryT[x] with        x=0 . . . upsBdryW−1 as outputs.    -   The MIP boundary downsampling process as specified in clause        8.4.5.2.3 is invoked for the left reference samples with the        block size nTbH, the reference samples refL[y] with y=0 . . .        nTbH−1, the boundary size boundarySize, the upsampling boundary        flag needUpsBdryVer, and the upsampling boundary size upsBdryH        as inputs, and reduced boundary samples redL[x] with x=0 . . .        boundarySize−1 and upsampling boundary samples upsBdryL[x] with        x=0 . . . upsBdryH−1 as outputs.    -   The reduced top and left boundary samples redT and redL are        assigned to the boundary sample array p as follows:        -   If isTransposed is equal to 1, p[x] is set equal to redL[x]            with x=0 . . . boundarySize−1 and p[x+boundarySize] is set            equal to redT[x] with x=0 . . . boundarySize−1.        -   Otherwise, p[x] is set equal to redT[x] with x=0 . . .            boundarySize−1 and p[x+boundarySize] is set equal to redL[x]            with x=0 . . . boundarySize−1.            For the intra sample prediction process according to            predModeIntra, the following ordered steps apply:    -   3. The matrix-based intra prediction samples predMip[x][y], with        x=0 . . . mipW−1, y=0 . . . mipH−1 are derived as follows:        -   The variable modeId is derived as follows:

modeId=predModeIntra−(isTransposed?numModes/2:0)  (8-63)

-   -   -   The weight matrix mWeight[x][y] with x=0 . . .            2*boundarySize−1, y=0 . . . predC*predC−1 is derived using            MipSizeId[xTbCmp][yTbCmp] and modeId as specified in Table            8-XX [Ed. (BB): add weight matrices once a non-10-bit weight            solution is adopted].        -   The bias vector vBias[y] with y=0 . . . predC*predC−1 is            derived using sizeId and modeId as specified in Table 8-XX            [Ed. (BB): add bias vectors once a non-10-bit weight            solution is adopted].        -   The variable sW is derived using MipSizeId[xTbCmp][yTbCmp]            and modeId as specified in Table 8-8.        -   The matrix-based intra prediction samples predMip[x][y],            with x=0 mipW−1, y=0. mipH−1 are derived as follows:

oW=1<<(sW−1)  (8-64)

sB=BitDepth_(Y)−1  (8-65)

incW=(predC>mipW)?2:1  (8-66)

incH=(predC>mipH)?2:1  (8-67)

predMip[x][y]=((Σ_(i=0) ^(2*boundarySize−1)mWeight[i][y*incH*predC+x*incW]*p[i])+(vBias[y*incH*predC+x*incW]<<sB)+oW)>>sW  (8-68)

-   -   4. When isTransposed is equal to TRUE, the predH×predW array        predMip[x][y] with x=0 . . . predH−1, y=0 . . . predW−1 is        transposed as follows:

predTemp[y][x]=predMip[x][y]  (8-69)

predMip=predTemp  (8-70)

-   -   5. The predicted samples predSamples[x][y], with x=0 . . .        nTbW−1, y=0 . . . nTbH−1 are derived as follows:        -   If needUpsBdryVer is equal to TRUE or needUpsBdryHor is            equal to TRUE, the MIP prediction upsampling process as            specified in clause 8.4.5.2.4 is invoked with the input            block width predW, the input block height predH,            matrix-based intra prediction samples predMip[x][y] with x=0            . . . predW−1, y=0 . . . predH−1, the transform block width            nTbW, the transform block height nTbH, the upsampling            boundary width upsBdryW, the upsampling boundary height            upsBdryH, the top upsampling boundary samples upsBdryT, and            the left upsampling boundary samples upsBdryL as inputs, and            the output is the predicted sample array predSamples.        -   Otherwise, predSamples[x y], with x=0 . . . nTbW−1, y=0 . .            . nTbH−1 is set equal to predMip[x][y].    -   6. The predicted samples predSamples[x y] with x=0 . . . nTbW−1,        y=0 . . . nTbH−1 are clipped as follows:

predSamples[x][y]=Clip1_(Y)(predSamples[x][y])  (8-71)

TABLE 8-8 Specification of weight shift sW depending on MipSizeId andmodeId modeId MipSizeId 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 0 88 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 1 8 8 8 9 8 8 8 8 9 8 2 8 8 8 8 8 8

8.4.5.2.4MIP Prediction Upsampling Process

Inputs to this process are:

-   -   a variable predW specifying the input block width,    -   a variable predH specifying the input block height,    -   matrix-based intra prediction samples predMip[x][y], with x=0 .        . . predW−1, y=0 . . . predH−1,    -   a variable nTbW specifying the transform block width,    -   a variable nTbH specifying the transform block height,    -   a variable upsBdryW specifying the upsampling boundary width,    -   a variable upsBdryH specifying the upsampling boundary height,    -   top upsampling boundary samples upsBdryT[x] with x=0 . . .        upsBdryW−1,    -   left upsampling boundary samples upsBdryL[x] with x=0 . . .        upsBdryH−1.

-   Outputs of this process are the predicted samples predSamples[x][y],    with x=0 . . . nTbW−1, y=0 . . . nTbH−1.    The sparse predicted samples predSamples[m][n] are derived from    predMip[x][y], with x=0 . . . predW−1, y=0 . . . predH−1 as follows:

upHor=nTbW/predW  (8-78)

upVer=nTbH/predH  (8-79)

predSamples[(x+1)*upHor−1][(y+1)*upVer−1]=predMip[x][y]  (8-80)

The top boundary samples upsBdryT[x] with x=0 . . . upsBdryW−1 areassigned to predSamples[m][−1] as follows:

predSamples[(x+1)*(nTbW/upsBdryW)−1][−1]=upsBdryT[x]  (8-81)

The left boundary samples upsBdryL[y] with y=0 . . . upsBdryH−1 areassigned to predSamples[−1][n] as follows:

predSamples[−1][(y+1)*(nTbH/upsBdryH)−1]=upsBdryL[y]  (8-82)

The predicted samples predSamples[x][y], with x=0 . . . nTbW−1, y=0 . .. nTbH−1 are derived as follows:

-   -   If nTbH is greater than nTbW, the following ordered steps apply:        -   1. When upHor is greater than 1, horizontal upsampling for            all sparse positions (xHor, yHor)=(m*upHor−1, n*upVer−1)            with m=0 . . . predW−1, n=1 . . . predH is applied with dX=1            . . . upHor−1 as follows:

sum=(upHor−dX)*predSamples[xHor][yHor]+dX*predSamples[xHor+upHor][yHor]  (8-83)

predSamples[xHor+dX][yHor]=(sum+upHor/2−(sum<0?1:0))/upHor  (8-84)

-   -   -   2. Vertical upsampling for all sparse positions (xVer,            yVer)=(m, n*upVer−1) with m=0 . . . nTbW−1, n=0 . . .            predH−1 is applied with dY=1 . . . upVer−1 as follows:

sum=(upVer−dY)*predSamples[xVer][yVer]+dY*predSamples[xVer][yVer+upVer]  (8-85)

predSamples[xVer][yVer+dY]=(sum+upVer/2−(sum<0?1:0))/upVer  (8-86)

-   -   Otherwise, the following ordered steps apply:        -   1. When upVer is greater than 1, vertical upsampling for all            sparse positions (xVer, yVer)=(m*upHor−1, n*upVer−1) with            m=1 . . . predW, n=0 . . . predH−1 is applied with dY=1 . .            . upVer−1 as follows:

sum=(upVer−dY)*predSamples[xVer][yVer]+dY*predSamples[xVer][yVer+upVer]  (8-87)

predSamples[xVer][yVer+dY]=(sum+upVer/2−(sum<0?1:0))/upVer  (8-88)

-   -   -   2. Horizontal upsampling for all sparse positions (xHor,            yHor)=(m*upHor−1, n) with m=0 . . . predW−1, n=0 . . .            nTbH−1 is applied with dX=1 . . . upHor−1 as follows:

sum=(upHor−dX)*predSamples[xHor][yHor]+dX*predSamples[xHor+upHor][yHor]  (8-89)

predSamples[xHor+dX][yHor]=(sum+upHor/2−(sum<0?1:0))/upHor  (8-90)

5.7.2 First Vertical Up-Sampling, then Horizontal Up-Sampling

8.4.5.2.1 Matrix-Based Intra Sample Prediction

Inputs to this process are:

-   -   a sample location (xTbCmp, yTbCmp) specifying the top-left        sample of the current transform block relative to the top-left        sample of the current picture,    -   a variable predModeIntra specifying the intra prediction mode,    -   a variable nTbW specifying the transform block width,    -   a variable nTbH specifying the transform block height.        Outputs of this process are the predicted samples        predSamples[x][y], with x=0 . . . nTbW−1, y=0 . . . nTbH−1.        Variables numModes, boundarySize, predW, predH and predC are        derived using MipSizeId[xTbCmp][yTbCmp] as specified in Table        8-7.

TABLE 8-7 Specification of number of prediction modes numModes, boundarysize boundarySize, and prediction sizes predW, predH and predC usingMipSizeId MipSizeId numModes boundarySize predW predH predC 0 35 2 4 4 41 19 4 4 4 4 2 11 4 Min( nTbW, Min( nTbH, 8 8 ) 8 )The flag isTransposed is derived as follows:

isTransposed=(predModeIntra>(numModes/2))?TRUE:FALSE  (8-56)

The flags needUpsBdryHor and needUpsBdryVer are derived as follows:

needUpsBdryHor=(nTbW>predW)?TRUE:FALSE  (8-57)

needUpsBdryVer=(nTbH>predH)?TRUE:FALSE  (8-58)

The variables upsBdryW and upsBdryH are derived as follows:

upsBdryW=(nTbH>nTbW)?nTbW:predW  (8-59)

upsBdryH=(nTbH>nTbW)?predH:nTbH  (8-60)

upsBdryW=predW  (8-59)

upsBdryH=nTbH  (8-60)

The variables mipW and mipH are derived as follows:

mipW=isTransposed?predH:predW  (8-61)

mipH=isTransposed?predW: predH  (8-62)

For the generation of the reference samples refT[x] with x=0 . . .nTbW−1 and refL[y] with y=0 . . . nTbH−1, the MIP reference samplederivation process as specified in clause 8.4.5.2.2 is invoked with thesample location (xTbCmp, yTbCmp), the transform block width nTbW, thetransform block height nTbH as inputs, and top and left referencesamples refT[x] with x=0 . . . nTbW−1 and refL[y] with y=0 . . . nTbH−1,respectively, as outputs.For the generation of the boundary samples p[x] with x=0 . . .2*boundarySize−1, the following applies:

-   -   The MIP boundary downsampling process as specified in clause        8.4.5.2.3 is invoked for the top reference samples with the        block size nTbW, the reference samples refT[x] with x=0 . . .        nTbW−1, the boundary size boundarySize, the upsampling boundary        flag needUpsBdryHor, and the upsampling boundary size upsBdryW        as inputs, and reduced boundary samples redT[x] with x=0 . . .        boundarySize−1 and upsampling boundary samples upsBdryT[x] with        x=0 . . . upsBdryW−1 as outputs.    -   The MIP boundary downsampling process as specified in clause        8.4.5.2.3 is invoked for the left reference samples with the        block size nTbH, the reference samples refL[y] with y=0 . . .        nTbH−1, the boundary size boundarySize, the upsampling boundary        flag needUpsBdryVer, and the upsampling boundary size upsBdryH        as inputs, and reduced boundary samples redL[x] with x=0 . . .        boundarySize−1 and upsampling boundary samples upsBdryL[x] with        x=0 . . . upsBdryH−1 as outputs.    -   The reduced top and left boundary samples redT and redL are        assigned to the boundary sample array p as follows:        -   If isTransposed is equal to 1, p[x] is set equal to redL[x]            with x=0 . . . boundarySize−1 and p[x+boundarySize] is set            equal to redT[x] with x=0 . . . boundarySize−1.        -   Otherwise, p[x] is set equal to redT[x] with x=0 . . .            boundarySize−1 and p[x+boundarySize] is set equal to redL[x]            with x=0 . . . boundarySize−1.            For the intra sample prediction process according to            predModeIntra, the following ordered steps apply:    -   7. The matrix-based intra prediction samples predMip[x][y], with        x=0 mipW−1, y=0 . . . mipH−1 are derived as follows:        -   The variable modeId is derived as follows:

modeId=predModeIntra−(isTransposed?numModes/2:0)  (8-63)

-   -   -   The weight matrix mWeight[x][y] with x=0 . . .            2*boundarySize−1, y=0 . . . predC*predC−1 is derived using            MipSizeId[xTbCmp][yTbCmp] and modeId as specified in Table            8-XX [Ed. (BB): add weight matrices once a non-10-bit weight            solution is adopted].        -   The bias vector vBias[y] with y=0 . . . predC*predC−1 is            derived using sizeId and modeId as specified in Table 8-XX            [Ed. (BB): add bias vectors once a non-10-bit weight            solution is adopted].        -   The variable sW is derived using MipSizeId[xTbCmp][yTbCmp]            and modeId as specified in Table 8-8.        -   The matrix-based intra prediction samples predMip[x][y],            with x=0 mipW−1, y=0. mipH−1 are derived as follows:

oW=1<<(sW−1)  (8-64)

sB=BitDepth_(Y)−1  (8-65)

incW=(predC>mipW)?2:1  (8-66)

incH=(predC>mipH)?2:1  (8-67)

predMip[x][y]=((Σ_(i=0) ^(2*boundarySize−1)mWeight[i][y*incH*predC+x*incW]*p[i])+(vBias[y*incH*predC+x*incW]<<sB)+oW)>>sW  (8-68)

-   -   8. When isTransposed is equal to TRUE, the predH×predW array        predMip[x][y] with x=0 . . . predH−1, y=0 . . . predW−1 is        transposed as follows:

predTemp[y][x]=predMip[x][y]  (8-69)

predMip=predTemp  (8-70)

-   -   9. The predicted samples predSamples[x][y], with x=0 . . .        nTbW−1, y=0 . . . nTbH−1 are derived as follows:        -   If needUpsBdryVer is equal to TRUE or needUpsBdryHor is            equal to TRUE, the MIP prediction upsampling process as            specified in clause 8.4.5.2.4 is invoked with the input            block width predW, the input block height predH,            matrix-based intra prediction samples predMip[x][y] with x=0            . . . predW−1, y=0 . . . predH−1, the transform block width            nTbW, the transform block height nTbH, the upsampling            boundary width upsBdryW, the upsampling boundary height            upsBdryH, the top upsampling boundary samples upsBdryT, and            the left upsampling boundary samples upsBdryL as inputs, and            the output is the predicted sample array predSamples.        -   Otherwise, predSamples[x y], with x=0 . . . nTbW−1, y=0 . .            . nTbH−1 is set equal to predMip[x][y].    -   10. The predicted samples predSamples[x y] with x=0 . . .        nTbW−1, y=0 . . . nTbH−1 are clipped as follows:

predSamples[x][y]=Clip1_(Y)(predSamples[x][y])  (8-71)

TABLE 8-8 Specification of weight shift sW depending on MipSizeId andmodeId modeId MipSizeId 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 0 88 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 1 8 8 8 9 8 8 8 8 9 8 2 8 8 8 8 8 8

8.4.5.2.4MIP Prediction Upsampling Process

Inputs to this process are:

-   -   a variable predW specifying the input block width,    -   a variable predH specifying the input block height,    -   matrix-based intra prediction samples predMip[x][y], with x=0 .        . . predW−1, y=0 . . . predH−1,    -   a variable nTbW specifying the transform block width,    -   a variable nTbH specifying the transform block height,    -   a variable upsBdryW specifying the upsampling boundary width,    -   a variable upsBdryH specifying the upsampling boundary height,    -   top upsampling boundary samples upsBdryT[x] with x=0 . . .        upsBdryW−1,    -   left upsampling boundary samples upsBdryL[x] with x=0 . . .        upsBdryH−1.

-   Outputs of this process are the predicted samples predSamples[x y],    with x=0 . . . nTbW−1, y=0 . . . nTbH−1.    The sparse predicted samples predSamples[m][n] are derived from    predMip[x][y], with x=0 . . . predW−1, y=0 . . . predH−1 as follows:

upHor=nTbW/predW  (8-78)

upVer=nTbH/predH  (8-79)

predSamples[(x+1)*upHor−1][(y+1)*upVer−1]=predMip[x][y]  (8-80)

The top boundary samples upsBdryT[x] with x=0 . . . upsBdryW−1 areassigned to predSamples[m][−1] as follows:

predSamples[(x+1)*(nTbW/upsBdryW)−1][−1]=upsBdryT[x]  (8-81)

The left boundary samples upsBdryL[y] with y=0 . . . upsBdryH−1 areassigned to predSamples[−1][n] as follows:

predSamples[−1][(y+1)*(nTbH/upsBdryH)−1]=upsBdryL[y]  (8-82)

The predicted samples predSamples[x y], with x=0 . . . nTbW−1, y=0 . . .nTbH−1 are derived as follows:

-   -   If nTbH is greater than nTbW, the following ordered steps apply:        -   1. When upHor is greater than 1, horizontal upsampling for            all sparse positions (xHor, yHor)=(m*upHor−1, n*upVer−1)            with m=0 . . . predW−1, n=1 . . . predH is applied with dX=1            . . . upHor−1 as follows:

sum=(upHor−dX)*predSamples[xHor][yHor]+dX*predSamples[xHor+upHor][yHor]  (8-83)

predSamples[xHor+dX][yHor]=(sum+upHor/2−(sum<0?1:0))/upHor  (8-84)

-   -   -   2. Vertical upsampling for all sparse positions (xVer,            yVer)=(m, n*upVer−1) with m=0 . . . nTbW−1, n=0 . . .            predH−1 is applied with dY=1 . . . upVer−1 as follows:

sum=(upVer−dY)*predSamples[xVer][yVer]+dY*predSamples[xVer][yVer+upVer]  (8-85)

predSamples[xVer][yVer+dY]=(sum+upVer/2−(sum<0?1:0))/upVer  (8-86)

-   -   Otherwise, the following ordered steps apply:        -   1. When upVer is greater than 1, vertical upsampling for all            sparse positions (xVer, yVer)=(m*upHor−1, n*upVer−1) with            m=1 . . . predW, n=0 . . . predH−1 is applied with dY=1 . .            . upVer−1 as follows:

sum=(upVer−dY)*predSamples[xVer][yVer]+dY*predSamples[xVer][yVer+upVer]  (8-87)

predSamples[xVer][yVer+dY]=(sum+upVer/2−(sum<0?1:0))/upVer  (8-88)

-   -   -   2. Horizontal upsampling for all sparse positions (xHor,            yHor)=(m*upHor−1, n) with m=0 . . . predW−1, n=0 . . .            nTbH−1 is applied with dX=1 . . . upHor−1 as follows:

sum=(upHor−dX)*predSamples[xHor][yHor]+dX*predSamples[xHor+upHor][yHor]  (8-89)

predSamples[xHor+dX][yHor]=(sum+upHor/2−(sum<0?1:0))/upHor  (8-90)

The examples described above may be incorporated in the context of themethods described below, e.g., methods 1100-1400 and 2300-2400, whichmay be implemented at a video encoder and/or decoder.

FIG. 11 shows a flowchart of an exemplary method for video processing.The method 1100 includes, at step 1110, determining that a current videoblock is coded using an affine linear weighted intra prediction (ALWIP)mode.

The method 1100 includes, at step 1120, constructing, based on thedetermining, at least a portion of a most probable mode (MPM) list forthe ALWIP mode based on an at least a portion of an MPM list for anon-ALWIP intra mode.

The method 1100 includes, at step 1130, performing, based on the MPMlist for the ALWIP mode, a conversion between the current video blockand a bitstream representation of the current video block.

In some embodiments, a size of the MPM list of the ALWIP mode isidentical to a size of the MPM list for the non-ALWIP intra mode. In anexample, the size of the MPM list of the ALWIP mode is 6.

In some embodiments, the method 1100 further comprises the step ofinserting default modes to the MPM list for the ALWIP mode. In anexample, the default modes are inserted prior to the portion of a MPMlist for the ALWIP mode that is based on the MPM list for the non-ALWIPintra mode. In another example, the default modes are insertedsubsequent to the portion of a MPM list for the ALWIP mode that is basedon the MPM list for the non-ALWIP intra mode. In yet another example,the default modes are inserted in an interleaved manner with the portionof a MPM list for the ALWIP mode that is based on the MPM list for thenon-ALWIP intra mode.

In some embodiments, constructing the MPM list for the ALWIP mode andthe MPM list for the non-ALWIP intra mode is based on one or moreneighboring blocks.

In some embodiments, constructing the MPM list for the ALWIP mode andthe MPM list for the non-ALWIP intra mode is based a height or a widthof the current video block.

In some embodiments, constructing the MPM list for the ALWIP mode isbased on a first set of parameters that is different from a second setof parameters used to construct the MPM list for the non-ALWIP intramode.

In some embodiments, the method 1100 further includes the step ofdetermining that a neighboring block of the current video block has beencoded with the ALWIP mode, and designating, in constructing the MPM listfor the non-ALWIP intra mode, the neighboring block as unavailable.

In some embodiments, the method 1100 further includes the step ofdetermining that a neighboring block of the current video block has beencoded with the non-ALWIP intra mode, and designating, in constructingthe MPM list for the ALWIP mode, the neighboring block as unavailable.

In some embodiments, the non-ALWIP intra mode is based on a normal intramode, a multiple reference line (MRL) intra prediction mode or an intrasub-partition (ISP) tool.

FIG. 12 shows a flowchart of an exemplary method for video processing.The method 1200 includes, at step 1210, determining that a lumacomponent of a current video block is coded using an affine linearweighted intra prediction (ALWIP) mode.

The method 1200 includes, at step 1220, inferring, based on thedetermining, a chroma intra mode.

The method 1200 includes, at step 1230, performing, based on the chromaintra mode, a conversion between the current video block and a bitstreamrepresentation of the current video block.

In some embodiments, the luma component covers a predetermined chromasample of the chroma component. In an example, the predetermined chromasample is a top-left sample or a center sample of the chroma component.

In some embodiments, the inferred chroma intra mode is a DM mode.

In some embodiments, the inferred chroma intra mode is the ALWIP mode.

In some embodiments, the ALWIP mode is applied to one or more chromacomponents of the current video block.

In some embodiments, different matrix or bias vectors of the ALWIP modeare applied to different color components of the current video block. Inan example, the different matrix or bias vectors are predefined jointlyfor Cb and Cr components. In another example, the Cb and Cr componentsare concatenated. In yet another example, the Cb and Cr components areinterleaved.

FIG. 13 shows a flowchart of an exemplary method for video processing.The method 1300 includes, at step 1310, determining that a current videoblock is coded using an affine linear weighted intra prediction (ALWIP)mode.

The method 1300 includes, at step 1320, performing, based on thedetermining, a conversion between the current video block and abitstream representation of the current video block.

In some embodiments, the determining is based on signaling in a sequenceparameter set (SPS), a picture parameter set (PPS), a slice header, atile group header, a tile header, a coding tree unit (CTU) row or a CTUregion.

In some embodiments, the determining is based on a height (H) or a width(W) of the current video block. In an example, W>T1 or H>T2. In anotherexample, W>T1 or H>T2. In yet another example, W<T1 or H<T2. In yetanother example, W<T1 or H<T2. In yet another example, T1=32 and T2=32.

In some embodiments, the determining is based on a height (H) or a width(W) of the current video block. In an example, W+H≤T. In anotherexample, W+H≥T. In yet another example, W×H≤T. In yet another example,W×H≥T. In yet another example, T=256.

FIG. 14 shows a flowchart of an exemplary method for video processing.The method 1400 includes, at step 1410, determining that a current videoblock is coded using a coding mode different from an affine linearweighted intra prediction (ALWIP) mode.

The method 1400 includes, at step 1420, performing, based on thedetermining, a conversion between the current video block and abitstream representation of the current video block.

In some embodiments, the coding mode is a combined intra and interprediction (CIIP) mode, and method 1400 further includes the step ofperforming a selection between the ALWIP mode and a normal intraprediction mode. In an example, performing the selection is based on anexplicit signaling in the bitstream representation of the current videoblock. In another example, performing the selection is based onpredetermined rule. In yet another example, the predetermined rulealways selects the ALWIP mode when the current video block is codedusing the CIIP mode. In yet another example, the predetermined rulealways selects the normal intra prediction mode when the current videoblock is coded using the CIIP mode.

In some embodiments, the coding mode is a cross-component linear model(CCLM) prediction mode. In an example, a downsampling procedure for theALWIP mode is based on a downsampling procedure for the CCLM predictionmode. In another example, the downsampling procedure for the ALWIP modeis based on a first set of parameters, and wherein the downsamplingprocedure for the CCLM prediction mode is based on a second set ofparameters different from the first set of parameters. In yet anotherexample, the downsampling procedure for the ALWIP mode or the CCLMprediction mode comprises at least one of a selection of downsampledpositions, a selection of downsampling filters, a rounding operation ora clipping operation.

In some embodiments, the method 1400 further includes the step ofapplying one or more of a Reduced Secondary Transform (RST), a secondarytransform, a rotation transform or a Non-Separable Secondary Transform(NSST).

In some embodiments, the method 1400 further includes the step ofapplying block-based differential pulse coded modulation (DPCM) orresidual DPCM.

In some embodiments, a video processing method includes determining,based on a rule for a current video block, a context of a flagindicative of use of affine linear weighted intra prediction (ALWIP)mode during a conversion between the current video block and a bitstreamrepresentation of the current video block, predicting, based on theALWIP mode, a plurality of sub-blocks of the current video block andperforming, based on the predicting, the conversion between the currentvideo block and a bitstream representation of the current video block.The rule may be specified implicitly using an a priori technique or maybe signaled in the coded bitstream. Other examples and aspects of thismethod are further described in items 37 and 38 in Section 4.

In some embodiments, a method for video processing includes determiningthat a current video block is coded using an affine linear weightedintra prediction (ALWIP) mode, and performing, during a conversionbetween the current video block and a bitstream representation of thecurrent video block, at least two filtering stages on samples of thecurrent video block in an upsampling process associated with the ALWIPmode, wherein a first precision of the samples in a first filteringstage of the at least two filtering stages is different from a secondprecision of the samples in a second filtering stage of the at least twofiltering stages.

In an example, the samples of the current video block are predictionsamples, intermedium samples before the upsampling process orintermedium samples after the upsampling process. In another example,the samples are upsampled in a first dimension horizontally in the firstfiltering stage, and wherein the samples are upsampled in a seconddimension vertically in the second filtering stage. In yet anotherexample, the samples are upsampled in a first dimension vertically inthe first filtering stage, and wherein the samples are upsampled in asecond dimension horizontally in the second filtering stage.

In an example, an output of the first filtering stage is right-shiftedor divided to generate a processed output, and wherein the processedoutput is an input to the second filtering stage. In another example, anoutput of the first filtering stage is left-shifted or multiplied togenerate a processed output, and wherein the processed output is aninput to the second filtering stage. Other examples and aspects of thismethod are further described in item 40 in Section 4.

As further described in items 41 to 43 in section 4, a video processingmethod includes determining that a current video block is coded using anaffine linear weighted intra prediction (ALWIP) mode, performing, duringa conversion between the current video block and a bitstreamrepresentation of the current video block, at least two filtering stageson samples of the current video block in an upsampling processassociated with the ALWIP mode, wherein the upsampling process isperformed in a fixed order for a case in which both vertical andhorizontal upsampling is performed. As further described in items 41 to43 in section 4, another method includes determining that a currentvideo block is coded using an affine linear weighted intra prediction(ALWIP) mode, performing, during a conversion between the current videoblock and a bitstream representation of the current video block, atleast two filtering stages on samples of the current video block in anupsampling process associated with the ALWIP mode, wherein theconversion includes performing a transposing operation prior to theupsampling process

Additional features of the above-described methods are described initems 41 to 43 in Section 4.

6 EXAMPLE IMPLEMENTATIONS OF THE DISCLOSED TECHNOLOGY

FIG. 15 is a block diagram of a video processing apparatus 1500. Theapparatus 1500 may be used to implement one or more of the methodsdescribed herein. The apparatus 1500 may be embodied in a smartphone,tablet, computer, Internet of Things (IoT) receiver, and so on. Theapparatus 1500 may include one or more processors 1502, one or morememories 1504 and video processing hardware 1506. The processor(s) 1502may be configured to implement one or more methods (including, but notlimited to, methods 1100-1400 and 2300-2400) described in the presentdocument. The memory (memories) 1504 may be used for storing data andcode used for implementing the methods and techniques described herein.The video processing hardware 1506 may be used to implement, in hardwarecircuitry, some techniques described in the present document.

In some embodiments, the video coding methods may be implemented usingan apparatus that is implemented on a hardware platform as describedwith respect to FIG. 15.

Some embodiments of the disclosed technology include making a decisionor determination to enable a video processing tool or mode. In anexample, when the video processing tool or mode is enabled, the encoderwill use or implement the tool or mode in the processing of a block ofvideo, but may not necessarily modify the resulting bitstream based onthe usage of the tool or mode. That is, a conversion from the block ofvideo to the bitstream representation of the video will use the videoprocessing tool or mode when it is enabled based on the decision ordetermination. In another example, when the video processing tool ormode is enabled, the decoder will process the bitstream with theknowledge that the bitstream has been modified based on the videoprocessing tool or mode. That is, a conversion from the bitstreamrepresentation of the video to the block of video will be performedusing the video processing tool or mode that was enabled based on thedecision or determination.

Some embodiments of the disclosed technology include making a decisionor determination to disable a video processing tool or mode. In anexample, when the video processing tool or mode is disabled, the encoderwill not use the tool or mode in the conversion of the block of video tothe bitstream representation of the video. In another example, when thevideo processing tool or mode is disabled, the decoder will process thebitstream with the knowledge that the bitstream has not been modifiedusing the video processing tool or mode that was disabled based on thedecision or determination.

FIG. 21 is a block diagram that illustrates an example video codingsystem 100 that may utilize the techniques of this disclosure. As shownin FIG. 21, video coding system 100 may include a source device 110 anda destination device 120. Source device 110 generates encoded video datawhich may be referred to as a video encoding device. Destination device120 may decode the encoded video data generated by source device 110which may be referred to as a video decoding device. Source device 110may include a video source 112, a video encoder 114, and an input/output(I/O) interface 116.

Video source 112 may include a source such as a video capture device, aninterface to receive video data from a video content provider, and/or acomputer graphics system for generating video data, or a combination ofsuch sources. The video data may comprise one or more pictures. Videoencoder 114 encodes the video data from video source 112 to generate abitstream. The bitstream may include a sequence of bits that form acoded representation of the video data. The bitstream may include codedpictures and associated data. The coded picture is a codedrepresentation of a picture. The associated data may include sequenceparameter sets, picture parameter sets, and other syntax structures. I/Ointerface 116 may include a modulator/demodulator (modem) and/or atransmitter. The encoded video data may be transmitted directly todestination device 120 via I/O interface 116 through network 130 a. Theencoded video data may also be stored onto a storage medium/server 130 bfor access by destination device 120.

Destination device 120 may include an I/O interface 126, a video decoder124, and a display device 122.

I/O interface 126 may include a receiver and/or a modem. I/O interface126 may acquire encoded video data from the source device 110 or thestorage medium/server 130 b. Video decoder 124 may decode the encodedvideo data. Display device 122 may display the decoded video data to auser. Display device 122 may be integrated with the destination device120, or may be external to destination device 120 which be configured tointerface with an external display device.

Video encoder 114 and video decoder 124 may operate according to a videocompression standard, such as the High Efficiency Video Coding (HEVC)standard, Versatile Video Coding (VVM) standard and other current and/orfurther standards.

FIG. 22 is a block diagram illustrating an example of video encoder 200,which may be video encoder 114 in the system 100 illustrated in FIG. 21.

Video encoder 200 may be configured to perform any or all of thetechniques of this disclosure. In the example of FIG. 22, video encoder200 includes a plurality of functional components. The techniquesdescribed in this disclosure may be shared among the various componentsof video encoder 200. In some examples, a processor may be configured toperform any or all of the techniques described in this disclosure.

The functional components of video encoder 200 may include a partitionunit 201, a predication unit 202 which may include a mode select unit203, a motion estimation unit 204, a motion compensation unit 205 and anintra prediction unit 206, a residual generation unit 207, a transformunit 208, a quantization unit 209, an inverse quantization unit 210, aninverse transform unit 211, a reconstruction unit 212, a buffer 213, andan entropy encoding unit 214.

In other examples, video encoder 200 may include more, fewer, ordifferent functional components. In an example, predication unit 202 mayinclude an intra block copy (IBC) unit. The IBC unit may performpredication in an IBC mode in which at least one reference picture is apicture where the current video block is located.

Furthermore, some components, such as motion estimation unit 204 andmotion compensation unit 205 may be highly integrated, but arerepresented in the example of FIG. 22 separately for purposes ofexplanation.

Partition unit 201 may partition a picture into one or more videoblocks. Video encoder 200 and video decoder 300 may support variousvideo block sizes.

Mode select unit 203 may select one of the coding modes, intra or inter,e.g., based on error results, and provide the resulting intra- orinter-coded block to a residual generation unit 207 to generate residualblock data and to a reconstruction unit 212 to reconstruct the encodedblock for use as a reference picture. In some example, Mode select unit203 may select a combination of intra and inter predication (CIIP) modein which the predication is based on an inter predication signal and anintra predication signal. Mode select unit 203 may also select aresolution for a motion vector (e.g., a sub-pixel or integer pixelprecision) for the block in the case of inter-predication.

To perform inter prediction on a current video block, motion estimationunit 204 may generate motion information for the current video block bycomparing one or more reference frames from buffer 213 to the currentvideo block. Motion compensation unit 205 may determine a predictedvideo block for the current video block based on the motion informationand decoded samples of pictures from buffer 213 other than the pictureassociated with the current video block.

Motion estimation unit 204 and motion compensation unit 205 may performdifferent operations for a current video block, for example, dependingon whether the current video block is in an I slice, a P slice, or a Bslice.

In some examples, motion estimation unit 204 may perform uni-directionalprediction for the current video block, and motion estimation unit 204may search reference pictures of list 0 or list 1 for a reference videoblock for the current video block. Motion estimation unit 204 may thengenerate a reference index that indicates the reference picture in list0 or list 1 that contains the reference video block and a motion vectorthat indicates a spatial displacement between the current video blockand the reference video block. Motion estimation unit 204 may output thereference index, a prediction direction indicator, and the motion vectoras the motion information of the current video block. Motioncompensation unit 205 may generate the predicted video block of thecurrent block based on the reference video block indicated by the motioninformation of the current video block.

In other examples, motion estimation unit 204 may perform bi-directionalprediction for the current video block, motion estimation unit 204 maysearch the reference pictures in list 0 for a reference video block forthe current video block and may also search the reference pictures inlist 1 for another reference video block for the current video block.Motion estimation unit 204 may then generate reference indexes thatindicate the reference pictures in list 0 and list 1 containing thereference video blocks and motion vectors that indicate spatialdisplacements between the reference video blocks and the current videoblock. Motion estimation unit 204 may output the reference indexes andthe motion vectors of the current video block as the motion informationof the current video block. Motion compensation unit 205 may generatethe predicted video block of the current video block based on thereference video blocks indicated by the motion information of thecurrent video block.

In some examples, motion estimation unit 204 may output a full set ofmotion information for decoding processing of a decoder.

In some examples, motion estimation unit 204 may do not output a fullset of motion information for the current video. Rather, motionestimation unit 204 may signal the motion information of the currentvideo block with reference to the motion information of another videoblock. For example, motion estimation unit 204 may determine that themotion information of the current video block is sufficiently similar tothe motion information of a neighboring video block.

In one example, motion estimation unit 204 may indicate, in a syntaxstructure associated with the current video block, a value thatindicates to the video decoder 300 that the current video block has thesame motion information as the another video block.

In another example, motion estimation unit 204 may identify, in a syntaxstructure associated with the current video block, another video blockand a motion vector difference (MVD). The motion vector differenceindicates a difference between the motion vector of the current videoblock and the motion vector of the indicated video block. The videodecoder 300 may use the motion vector of the indicated video block andthe motion vector difference to determine the motion vector of thecurrent video block.

As discussed above, video encoder 200 may predictively signal the motionvector. Two examples of predictive signaling techniques that may beimplemented by video encoder 200 include advanced motion vectorpredication (AMVP) and merge mode signaling.

Intra prediction unit 206 may perform intra prediction on the currentvideo block. When intra prediction unit 206 performs intra prediction onthe current video block, intra prediction unit 206 may generateprediction data for the current video block based on decoded samples ofother video blocks in the same picture. The prediction data for thecurrent video block may include a predicted video block and varioussyntax elements.

Residual generation unit 207 may generate residual data for the currentvideo block by subtracting (e.g., indicated by the minus sign) thepredicted video block(s) of the current video block from the currentvideo block. The residual data of the current video block may includeresidual video blocks that correspond to different sample components ofthe samples in the current video block.

In other examples, there may be no residual data for the current videoblock for the current video block, for example in a skip mode, andresidual generation unit 207 may not perform the subtracting operation.

Transform processing unit 208 may generate one or more transformcoefficient video blocks for the current video block by applying one ormore transforms to a residual video block associated with the currentvideo block.

After transform processing unit 208 generates a transform coefficientvideo block associated with the current video block, quantization unit209 may quantize the transform coefficient video block associated withthe current video block based on one or more quantization parameter (QP)values associated with the current video block.

Inverse quantization unit 210 and inverse transform unit 211 may applyinverse quantization and inverse transforms to the transform coefficientvideo block, respectively, to reconstruct a residual video block fromthe transform coefficient video block. Reconstruction unit 212 may addthe reconstructed residual video block to corresponding samples from oneor more predicted video blocks generated by the predication unit 202 toproduce a reconstructed video block associated with the current blockfor storage in the buffer 213.

After reconstruction unit 212 reconstructs the video block, loopfiltering operation may be performed reduce video blocking artifacts inthe video block.

Entropy encoding unit 214 may receive data from other functionalcomponents of the video encoder 200. When entropy encoding unit 214receives the data, entropy encoding unit 214 may perform one or moreentropy encoding operations to generate entropy encoded data and outputa bitstream that includes the entropy encoded data.

FIG. 19 is a block diagram illustrating an example of video decoder 300which may be video decoder 114 in the system 100 illustrated in FIG. 21.

The video decoder 300 may be configured to perform any or all of thetechniques of this disclosure. In the example of FIG. 19, the videodecoder 300 includes a plurality of functional components. Thetechniques described in this disclosure may be shared among the variouscomponents of the video decoder 300. In some examples, a processor maybe configured to perform any or all of the techniques described in thisdisclosure.

In the example of FIG. 19, video decoder 300 includes an entropydecoding unit 301, a motion compensation unit 302, an intra predictionunit 303, an inverse quantization unit 304, an inverse transformationunit 305, and a reconstruction unit 306 and a buffer 307. Video decoder300 may, in some examples, perform a decoding pass generally reciprocalto the encoding pass described with respect to video encoder 200 (FIG.22).

Entropy decoding unit 301 may retrieve an encoded bitstream. The encodedbitstream may include entropy coded video data (e.g., encoded blocks ofvideo data). Entropy decoding unit 301 may decode the entropy codedvideo data, and from the entropy decoded video data, motion compensationunit 302 may determine motion information including motion vectors,motion vector precision, reference picture list indexes, and othermotion information. Motion compensation unit 302 may, for example,determine such information by performing the AMVP and merge mode.

Motion compensation unit 302 may produce motion compensated blocks,possibly performing interpolation based on interpolation filters.Identifiers for interpolation filters to be used with sub-pixelprecision may be included in the syntax elements.

Motion compensation unit 302 may use interpolation filters as used byvideo encoder 20 during encoding of the video block to calculateinterpolated values for sub-integer pixels of a reference block. Motioncompensation unit 302 may determine the interpolation filters used byvideo encoder 200 according to received syntax information and use theinterpolation filters to produce predictive blocks.

Motion compensation unit 302 may uses some of the syntax information todetermine sizes of blocks used to encode frame(s) and/or slice(s) of theencoded video sequence, partition information that describes how eachmacroblock of a picture of the encoded video sequence is partitioned,modes indicating how each partition is encoded, one or more referenceframes (and reference frame lists) for each inter-encoded block, andother information to decode the encoded video sequence.

Intra prediction unit 303 may use intra prediction modes for examplereceived in the bitstream to form a prediction block from spatiallyadjacent blocks. Inverse quantization unit 303 inverse quantizes, i.e.,de-quantizes, the quantized video block coefficients provided in thebitstream and decoded by entropy decoding unit 301. Inverse transformunit 303 applies an inverse transform.

Reconstruction unit 306 may sum the residual blocks with thecorresponding prediction blocks generated by motion compensation unit202 or intra-prediction unit 303 to form decoded blocks. If desired, adeblocking filter may also be applied to filter the decoded blocks inorder to remove blockiness artifacts. The decoded video blocks are thenstored in buffer 307, which provides reference blocks for subsequentmotion compensation/intra predication and also produces decoded videofor presentation on a display device.

In the present document, the term “video processing” may refer to videoencoding, video decoding, video compression or video decompression. Forexample, video compression algorithms may be applied during conversionfrom pixel representation of a video to a corresponding bitstreamrepresentation or vice versa. The bitstream representation, or codedrepresentation, of a current video block may, for example, correspond tobits that are either co-located or spread in different places within thebitstream, as is defined by the syntax. For example, a video block maybe encoded in terms of transformed and coded error residual values andalso using bits in headers and other fields in the bitstream.Furthermore, during conversion, a decoder may parse a bitstream with theknowledge that some fields may be present, or absent, based on thedetermination, as is described in the above solutions. Similarly, anencoder may determine that certain syntax fields are or are not to beincluded and generate the coded representation accordingly by includingor excluding the syntax fields from the coded representation.

FIG. 20 is a block diagram showing an example video processing system2000 in which various techniques disclosed herein may be implemented.Various implementations may include some or all of the components of thesystem 2000. The system 2000 may include input 2002 for receiving videocontent. The video content may be received in a raw or uncompressedformat, e.g., 8 or 10 bit multi-component pixel values, or may be in acompressed or encoded format. The input 2002 may represent a networkinterface, a peripheral bus interface, or a storage interface. Examplesof network interface include wired interfaces such as Ethernet, passiveoptical network (PON), etc. and wireless interfaces such as Wi-Fi orcellular interfaces.

The system 2000 may include a coding component 2004 that may implementthe various coding or encoding methods described in the presentdocument. The coding component 2004 may reduce the average bitrate ofvideo from the input 2002 to the output of the coding component 2004 toproduce a coded representation of the video. The coding techniques aretherefore sometimes called video compression or video transcodingtechniques. The output of the coding component 2004 may be eitherstored, or transmitted via a communication connected, as represented bythe component 2006. The stored or communicated bitstream (or coded)representation of the video received at the input 2002 may be used bythe component 2008 for generating pixel values or displayable video thatis sent to a display interface 2010. The process of generatinguser-viewable video from the bitstream representation is sometimescalled video decompression. Furthermore, while certain video processingoperations are referred to as “coding” operations or tools, it will beappreciated that the coding tools or operations are used at an encoderand corresponding decoding tools or operations that reverse the resultsof the coding will be performed by a decoder.

Examples of a peripheral bus interface or a display interface mayinclude universal serial bus (USB) or high definition multimediainterface (HDMI) or Displayport, and so on. Examples of storageinterfaces include SATA (serial advanced technology attachment), PCI,IDE interface, and the like. The techniques described in the presentdocument may be embodied in various electronic devices such as mobilephones, laptops, smartphones or other devices that are capable ofperforming digital data processing and/or video display.

In some embodiments, the ALWIP mode or the MIP mode is used to compute aprediction block of the current video block by performing, on previouslycoded samples of the video, a boundary downsampling operation (or anaveraging operation), followed by a matrix vector multiplicationoperation, and selectively (or optionally) followed by an upsamplingoperation (or a linear interpolation operation). In some embodiments,the ALWIP mode or the MIP mode is used to compute a prediction block ofthe current video block by performing, on previously coded samples ofthe video, a boundary downsampling operation (or an averaging operation)and followed by a matrix vector multiplication operation. In someembodiments, the ALWIP mode or the MIP mode can also perform anupsampling operation (or a linear interpolation operation) afterperforming the matrix vector multiplication operation.

FIG. 23 shows a flowchart of an exemplary method 2300 for videoprocessing. The method 2300 includes performing 2302 a conversionbetween a current video block of a video and a bitstream representationof the current video block using a matrix based intra prediction (MIP)mode in which a prediction block of the current video block isdetermined by performing, on previously coded samples of the video, aboundary downsampling operation, followed by a matrix vectormultiplication operation, and selectively followed by an upsamplingoperation, where the conversion includes performing the boundarydownsampling operation in a single stage in which reduced boundarysamples of the current video block are generated according to a rulebased at least on reference boundary samples of the current video block,and where the conversion includes performing the matrix vectormultiplication operation using the reduced boundary samples of thecurrent video block.

In some embodiments for method 2300, the reference boundary samples arereconstructed neighboring samples of the current video block. In someembodiments for method 2300, the rule specifies that the reducedboundary samples are generated from the reconstructed neighboringsamples of the current video block. In some embodiments for method 2300,the reconstructed neighboring samples are decoded neighboring sampleswithout a reference filtering process in which the reconstructedneighboring samples are not filtered prior to being used for the currentvideo block. In some embodiments for method 2300, the reconstructedneighboring samples are decoded neighboring samples with a referencefiltering process in which the reconstructed neighboring samples arefiltered prior to being used for the current video block.

In some embodiments for method 2300, angular intra prediction samplesare generated with the reconstructed neighboring samples. In someembodiments for method 2300, non-angular intra prediction samples aregenerated with the reconstructed neighboring samples. In someembodiments for method 2300, the rule specifies that the reducedboundary samples are generated from the reconstructed neighboringsamples located at a row above the current video block and/or located ata column to left of the current video block. In some embodiments formethod 2300, a first number (N) of reduced boundary samples aregenerated from a second number (M) of the reconstructed neighboringsamples, and a reduced boundary sample is generated using a third number(K) of successive reconstructed neighboring samples. In some embodimentsfor method 2300, K=M/N. In some embodiments for method 2300,K=(M+N/2)/N. In some embodiments for method 2300, the reduced boundarysample is generated based on an average of the successive reconstructedneighboring samples in the third number (K) of successive reconstructedneighboring samples.

In some embodiments for method 2300, the reduced boundary sample isgenerated based on a weighted average of the successive reconstructedneighboring samples in the third number (K) of successive reconstructedneighboring samples. In some embodiments for method 2300, the rulespecifies that: the reduced boundary samples located at left of thecurrent video block are generated from the reconstructed neighboringsamples located at a neighboring column to left of the current videoblock, and the reduced boundary samples located on top of the currentvideo block are generated from the reconstructed neighboring sampleslocated at a neighboring row above the current video block. In someembodiments for method 2300, the current video block is a 16×16 videoblock, four reduced boundary samples located at left of the 16×16 videoblock are generated from the reconstructed neighboring samples locatedat the neighboring column to left of the 16×16 video block, and fourreduced boundary samples located on top of the 16×16 video block aregenerated from the reconstructed neighboring samples located at theneighboring row above the 16×16 video block.

In some embodiments for method 2300, the rule specifies that a techniquewith which the reduced boundary samples are generated by the boundarydownsampling operation is based on dimensions of the current videoblock. In some embodiments for method 2300, the rule specifies that atechnique with which the reduced boundary samples are generated by theboundary downsampling operation is based on coded information associatedwith the current video block. In some embodiments for method 2300, thecoded information includes a width of the current video block, a heightof the current video block, an indication of an intra prediction mode ora transform mode associated with the current video block. In someembodiments for method 2300, the rule specifies that the reducedboundary samples are generated irrespective of a size of the currentvideo block. In some embodiments for method 2300, the rule specifiesthat a process with which the reduced boundary samples located at leftof the current video block are generated differs from that with whichthe reduced boundary samples located on top of the current video blockare generated. In some embodiments for method 2300, the current videoblock has a width (M) and a height (N), a first pre-defined number ofreduced boundary samples located on top of the current video block is M,N, or a minimum value between M and N, a second pre-defined number ofreduced boundary samples located to left of the current video block isM, N, or a minimum value between M and N, the first number of reducedboundary samples are generated based on neighboring samples or bycopying neighboring samples located at a row above the current videoblock, and the second number of reduced boundary samples are generatedby copying neighboring samples or based on neighboring samples locatedat a column to left of the current video block.

FIG. 24 shows a flowchart of an exemplary method 2400 for videoprocessing. The method 2400 includes performing 2402 a conversionbetween a current video block of a video and a bitstream representationof the current video block using a matrix based intra prediction (MIP)mode in which a final prediction block of the current video block isdetermined by performing, on previously coded samples of the video, aboundary downsampling operation, followed by a matrix vectormultiplication operation, and followed by an upsampling operation, wherethe conversion includes performing the upsampling operation in which thefinal prediction block is determined by using a reduced prediction blockof the current video block and by using reconstructed neighboringsamples of the current video block according to a rule, and where thereduced prediction block is obtained by performing the matrix vectormultiplication operation on reduced boundary samples of the currentvideo block.

In some embodiments for method 2400, the rule specifies that the finalprediction block is determined by using all of the reconstructedneighboring samples. In some embodiments for method 2400, the rulespecifies that the final prediction block is determined by using some ofthe reconstructed neighboring samples. In some embodiments for method2400, the reconstructed neighboring samples are adjacent to the currentvideo block. In some embodiments for method 2400, the reconstructedneighboring samples are non-adjacent to the current video block. In someembodiments for method 2400, the reconstructed neighboring samples arelocated at a neighboring row above the current video block, and/or thereconstructed neighboring samples are located at a neighboring column toleft of the current video block.

In some embodiments for method 2400, the rule specifies that the reducedboundary samples are excluded from the upsampling operation whendetermining the final prediction block. In some embodiments for method2400, the rule specifies that the final prediction block is determinedby using a set of reconstructed neighboring samples selected from thereconstructed neighboring samples. In some embodiments for method 2400,the set of reconstructed neighboring samples selected from thereconstructed neighboring samples include a selection of all of thereconstructed neighboring samples located to left of the current videoblock. In some embodiments for method 2400, the set of reconstructedneighboring samples selected from the reconstructed neighboring samplesinclude a selection of all of the reconstructed neighboring sampleslocated above the current video block.

In some embodiments for method 2400, the set of reconstructedneighboring samples selected from the reconstructed neighboring samplesinclude a selection of K out of each M successive reconstructedneighboring samples located to left of the current video block. In someembodiments for method 2400, K is equal to 1 and M is equal to 2, 4, or8. In some embodiments for method 2400, the K out of each M successivereconstructed neighboring samples includes a last K reconstructedneighboring samples in each M successive. In some embodiments for method2400, the K out of each M successive reconstructed neighboring samplesincludes a first K reconstructed neighboring samples in each Msuccessive. In some embodiments for method 2400, the set ofreconstructed neighboring samples selected from the reconstructedneighboring samples include a selection of K out of each M successivereconstructed neighboring samples located above the current video block.In some embodiments for method 2400, K is equal to 1 and M is equal to2, 4, or 8. In some embodiments for method 2400, the K out of each Msuccessive reconstructed neighboring samples includes a last Kreconstructed neighboring samples in each M successive.

In some embodiments for method 2400, the K out of each M successivereconstructed neighboring samples includes a first K reconstructedneighboring samples in each M successive. In some embodiments for method2400, the set of reconstructed neighboring samples is selected from thereconstructed neighboring samples based on a width of the current videoblock and/or a height of the current video block. In some embodimentsfor method 2400, in response to the width of the current video blockbeing greater than or equal to the height of the current video block:the set of reconstructed neighboring samples is selected to include allof the reconstructed neighboring samples located to left of the currentvideo block, and/or the set of reconstructed neighboring samples isselected to include a number of the reconstructed neighboring sampleslocated above the current video block, wherein the number of thereconstructed neighboring samples depends on the width of the currentvideo block.

In some embodiments for method 2400, a k-th selected reconstructedneighboring sample located above the current video block is located atposition described by (blkX+(k+1)*blkW/M−1, blkY−1), where (blkX, blkY)represents a top left position of the current video block, where M isthe number of the reconstructed neighboring samples, and where k is from0 to (M−1), inclusive. In some embodiments for method 2400, the numberof the reconstructed neighboring samples is equal to 4 in response tothe width being less than or equal to 8. In some embodiments for method2400, the number of the reconstructed neighboring samples is equal to 8in response to the width being greater than 8. In some embodiments formethod 2400, the set of reconstructed neighboring samples is selected toinclude all of the reconstructed neighboring samples located to left ofthe current video block, and/or the set of reconstructed neighboringsamples is selected to include a number of the reconstructed neighboringsamples located above the current video block, wherein the number of thereconstructed neighboring samples depends on the width of the currentvideo block.

In some embodiments for method 2400, the number of the reconstructedneighboring samples is equal to 4 in response to the width being lessthan or equal to 8. In some embodiments for method 2400, the number ofthe reconstructed neighboring samples is equal to 8 in response to thewidth being greater than 8. In some embodiments for method 2400, inresponse to the width of the current video block being less than theheight of the current video block: the set of reconstructed neighboringsamples is selected to include all of the reconstructed neighboringsamples located above the current video block, and/or the set ofreconstructed neighboring samples is selected to include a number of thereconstructed neighboring samples located to left the current videoblock, wherein the number of the reconstructed neighboring samplesdepends on the height of the current video block.

In some embodiments for method 2400, a k-th selected reconstructedneighboring sample located to left of the current video block is locatedat position described by (blkX−1, blkY+(k+1)*blkH/M−1), where (blkX,blkY) represents a top left position of the current video block, where Mis the number of the reconstructed neighboring samples, and where k isfrom 0 to (M−1), inclusive. In some embodiments for method 2400, thenumber of the reconstructed neighboring samples is equal to 4 inresponse to the height being less than or equal to 8. In someembodiments for method 2400, the number of the reconstructed neighboringsamples is equal to 8 in response to the height being greater than 8. Insome embodiments for method 2400, the set of reconstructed neighboringsamples is selected to include all of the reconstructed neighboringsamples located above the current video block, and/or the set ofreconstructed neighboring samples is selected to include a number of thereconstructed neighboring samples located to left of the current videoblock, wherein the number of the reconstructed neighboring samplesdepends on the height of the current video block.

In some embodiments for method 2400, the number of the reconstructedneighboring samples is equal to 4 in response to the height being lessthan or equal to 8. In some embodiments for method 2400, the number ofthe reconstructed neighboring samples is equal to 8 in response to theheight being greater than 8. In some embodiments for method 2400, therule specifies that the final prediction block is determined by using aset of modified reconstructed neighboring samples obtained by modifyingthe reconstructed neighboring samples. In some embodiments for method2400, the rule specifies that the set of modified reconstructedneighboring samples are obtained by performing a filtering operation onthe reconstructed neighboring samples. In some embodiments for method2400, the filtering operation uses a N-tap filter. In some embodimentsfor method 2400, N is equal to 2 or 3.

In some embodiments for method 2400, the rule specifies that thefiltering operation is adaptively applied according to the MIP mode inwhich the final prediction block of the current video block isdetermined. In some embodiments for method 2400, a technique with whichthe final prediction block is determined by the upsampling operation isbased on dimensions of the current video block. In some embodiments formethod 2400, a technique with which the final prediction block isdetermined by the upsampling operation is based on coded informationassociated with the current video block. In some embodiments for method2400, the coded information includes an indication of an intraprediction direction or a transform mode associated with the currentvideo block.

In some embodiments for the methods described in this patent document,the performing the conversion includes generating the bitstreamrepresentation from the current video block. In some embodiments for themethods described in this patent document, the performing the conversionincludes generating the current video block from the bitstreamrepresentation.

From the foregoing, it will be appreciated that specific embodiments ofthe presently disclosed technology have been described herein forpurposes of illustration, but that various modifications may be madewithout deviating from the scope of the invention. Accordingly, thepresently disclosed technology is not limited except as by the appendedclaims.

Implementations of the subject matter and the functional operationsdescribed in this patent document can be implemented in various systems,digital electronic circuitry, or in computer software, firmware, orhardware, including the structures disclosed in this specification andtheir structural equivalents, or in combinations of one or more of them.Implementations of the subject matter described in this specificationcan be implemented as one or more computer program products, i.e., oneor more modules of computer program instructions encoded on a tangibleand non-transitory computer readable medium for execution by, or tocontrol the operation of, data processing apparatus. The computerreadable medium can be a machine-readable storage device, amachine-readable storage substrate, a memory device, a composition ofmatter effecting a machine-readable propagated signal, or a combinationof one or more of them. The term “data processing unit” or “dataprocessing apparatus” encompasses all apparatus, devices, and machinesfor processing data, including by way of example a programmableprocessor, a computer, or multiple processors or computers. Theapparatus can include, in addition to hardware, code that creates anexecution environment for the computer program in question, e.g., codethat constitutes processor firmware, a protocol stack, a databasemanagement system, an operating system, or a combination of one or moreof them.

A computer program (also known as a program, software, softwareapplication, script, or code) can be written in any form of programminglanguage, including compiled or interpreted languages, and it can bedeployed in any form, including as a stand-alone program or as a module,component, subroutine, or other unit suitable for use in a computingenvironment. A computer program does not necessarily correspond to afile in a file system. A program can be stored in a portion of a filethat holds other programs or data (e.g., one or more scripts stored in amarkup language document), in a single file dedicated to the program inquestion, or in multiple coordinated files (e.g., files that store oneor more modules, sub programs, or portions of code). A computer programcan be deployed to be executed on one computer or on multiple computersthat are located at one site or distributed across multiple sites andinterconnected by a communication network.

The processes and logic flows described in this specification can beperformed by one or more programmable processors executing one or morecomputer programs to perform functions by operating on input data andgenerating output. The processes and logic flows can also be performedby, and apparatus can also be implemented as, special purpose logiccircuitry, e.g., an FPGA (field programmable gate array) or an ASIC(application specific integrated circuit).

Processors suitable for the execution of a computer program include, byway of example, both general and special purpose microprocessors, andany one or more processors of any kind of digital computer. Generally, aprocessor will receive instructions and data from a read only memory ora random access memory or both. The essential elements of a computer area processor for performing instructions and one or more memory devicesfor storing instructions and data. Generally, a computer will alsoinclude, or be operatively coupled to receive data from or transfer datato, or both, one or more mass storage devices for storing data, e.g.,magnetic, magneto optical disks, or optical disks. However, a computerneed not have such devices. Computer readable media suitable for storingcomputer program instructions and data include all forms of nonvolatilememory, media and memory devices, including by way of examplesemiconductor memory devices, e.g., EPROM, EEPROM, and flash memorydevices. The processor and the memory can be supplemented by, orincorporated in, special purpose logic circuitry.

It is intended that the specification, together with the drawings, beconsidered exemplary only, where exemplary means an example. As usedherein, the use of “or” is intended to include “and/or”, unless thecontext clearly indicates otherwise.

While this patent document contains many specifics, these should not beconstrued as limitations on the scope of any invention or of what may beclaimed, but rather as descriptions of features that may be specific toparticular embodiments of particular inventions. Certain features thatare described in this patent document in the context of separateembodiments can also be implemented in combination in a singleembodiment. Conversely, various features that are described in thecontext of a single embodiment can also be implemented in multipleembodiments separately or in any suitable subcombination. Moreover,although features may be described above as acting in certaincombinations and even initially claimed as such, one or more featuresfrom a claimed combination can in some cases be excised from thecombination, and the claimed combination may be directed to asubcombination or variation of a subcombination.

Similarly, while operations are depicted in the drawings in a particularorder, this should not be understood as requiring that such operationsbe performed in the particular order shown or in sequential order, orthat all illustrated operations be performed, to achieve desirableresults. Moreover, the separation of various system components in theembodiments described in this patent document should not be understoodas requiring such separation in all embodiments.

Only a few implementations and examples are described and otherimplementations, enhancements and variations can be made based on whatis described and illustrated in this patent document.

What is claimed is:
 1. A method of processing video data, comprising:determining, for a conversion between a video block of a video and abitstream of the video, that a first intra mode is applied on the videoblock of the video, wherein a process in the first intra mode includes amatrix vector multiplication operation and followed by an upsamplingoperation to generate prediction samples for the video block of thevideo; and performing the conversion based on the prediction samples;wherein inputs to the upsampling operation includes neighboringreference samples of the video block of the video.
 2. The method ofclaim 1, wherein inputs to the upsampling operation includes: a set ofleft neighboring reference samples selected from the left neighboringreference samples of the video block, and a set of above neighboringreference samples selected from the above neighboring reference samplesof the video block.
 3. The method of claim 2, wherein the set of leftneighboring reference samples and the set of above neighboring referencesamples are derived without an intra reference filtering process.
 4. Themethod of claim 2, wherein the video block has a width W and a height H,and wherein the set of left neighboring reference samples include aselection of H left neighboring reference samples of the video block,and the set of above neighboring reference samples include a selectionof W above neighboring reference samples; wherein W and H are integers.5. The method of claim 2, wherein the upsampling operation includes atleast one of horizontal upsampling operation and vertical upsamplingoperation, wherein the horizontal upsampling operation includesinterpolating samples by using the left neighboring reference samples,and the vertical upsampling operation includes interpolating samples byusing the above neighboring reference samples.
 6. The method of claim 1,wherein the process in the first intra mode further includes adownsampling operation prior to the matrix vector multiplicationoperation based on a size of the video block.
 7. The method of claim 6,wherein the downsampling operation is performed on the neighboringreference samples of the video block to generate reduced samples, andwherein the reduced samples are inputted to the matrix vectormultiplication operation and are excluded from the upsampling operation.8. The method of claim 7, wherein N reduced samples are derived by Mneighboring reference samples without deriving intermediate samples, andeach of the N reduced samples is determined based on K successivesamples of the M neighboring reference samples, wherein M and N areintegers, wherein K is determined based on M/N.
 9. The method of claim8, wherein each of the N reduced boundary sample is determined based onthe average of the K successive samples of the M neighboring referencesamples.
 10. The method of claim 7, wherein a one-dimensional vectorarray is further derived based on concatenating the reduced samples andthe one-dimensional vector array is used as input of the matrix vectormultiplication operation to generate a two-dimensional array.
 11. Themethod of claim 7, wherein the two-dimensional array having a width of afirst value and a height of a second value is transposed to an arrayhaving a width of the second value and a height of the first valuebefore the upsampling operation according to a syntax element.
 12. Themethod of claim 1, wherein the upsampling operation includes at leastone of horizontal upsampling operation and vertical upsamplingoperation, and an order of the horizontal upsampling operation andvertical upsampling operation in the upsampling operation for the videoblock with a height greater than a width is the same as for the videoblock with the width greater than the height.
 13. The method of claim 1,wherein the conversion includes encoding the video block into thebitstream.
 14. The method of claim 1, wherein the conversion includesdecoding the video block from the bitstream.
 15. An apparatus forprocessing video data comprising a processor and a non-transitory memorywith instructions thereon, wherein the instructions upon execution bythe processor, cause the processor to: determine, for a conversionbetween a video block of a video and a bitstream of the video, that afirst intra mode is applied on the video block of the video, wherein aprocess in the first intra mode includes a matrix vector multiplicationoperation and followed by an upsampling operation to generate predictionsamples for the video block of the video; and perform the conversionbased on the prediction samples; wherein inputs to the upsamplingoperation includes neighboring reference samples of the video block ofthe video.
 16. The apparatus of claim 15, wherein inputs to theupsampling operation includes left and above neighboring referencesamples of the video block derived without an in-loop filtering process,and the upsampling operation includes at least one of horizontalupsampling operation and vertical upsampling operation, wherein thehorizontal upsampling operation includes interpolating samples by usingthe left neighboring reference samples, and the vertical upsamplingoperation includes interpolating samples by using the above neighboringreference samples.
 17. The apparatus of claim 15, wherein the process inthe first intra mode further includes a downsampling operation prior tothe matrix vector multiplication operation and performed on theneighboring reference samples of the video block to generate reducedsamples, wherein the reduced samples are inputted to the matrix vectormultiplication operation and are excluded from the upsampling operation,and wherein the reduced samples are generated directly from theneighboring reference samples of the video block and a downscalingfactor without deriving intermediate samples.
 18. A non-transitorycomputer-readable storage medium storing instructions that cause aprocessor to: determine, for a conversion between a video block of avideo and a bitstream of the video, that a first intra mode is appliedon the video block of the video, wherein process in the first intra modeincludes a matrix vector multiplication operation and followed by anupsampling operation to generate prediction samples for the video blockof the video; and perform the conversion based on the predictionsamples; wherein inputs to the upsampling operation includes neighboringreference samples of the video block of the video.
 19. The storagemedium of claim 18, wherein inputs to the upsampling operation includesleft and above neighboring reference samples of the video block derivedwithout an in-loop filtering process, and the upsampling operationincludes at least one of horizontal upsampling operation and verticalupsampling operation, and wherein the process in the first intra modefurther includes a downsampling operation prior to the matrix vectormultiplication operation and performed on the neighboring referencesamples of the video block to generate reduced samples, wherein thereduced samples are inputted to the matrix vector multiplicationoperation and are excluded from the upsampling operation, and whereinthe reduced samples are generated directly from the neighboringreference samples of the video block and a downscaling factor withoutderiving intermediate samples.
 20. A non-transitory computer-readablerecording medium storing a bitstream of a video which is generated by amethod performed by a video processing apparatus, wherein the methodcomprises: determining, that a first intra mode is applied on the videoblock of the video, wherein process in the first intra mode includes amatrix vector multiplication operation and followed by an upsamplingoperation to generate prediction samples for the video block of thevideo; and generating the bitstream based on the determining; whereininputs to the upsampling operation includes neighboring referencesamples of the video block of the video.